pub struct PhysicsMaterial2D {
pub bounciness: f32,
pub friction: f32,
pub m_Name: String,
}Expand description
PhysicsMaterial2D is a class of the Unity engine since version 4.3.0. Exert from Unity’s scripting documentation: Asset type that defines the surface properties of a Collider2D. Note: the 3D equivalent of this class is spelt as “PhysicMaterial” with no S, but this class is spelt “PhysicsMaterial” with an S.See Also: PhysicMaterial class.
Fields§
§bounciness: f32The degree of elasticity during collisions.
friction: f32Coefficient of friction.
m_Name: StringThe name of the object.
Trait Implementations§
Source§impl Debug for PhysicsMaterial2D
impl Debug for PhysicsMaterial2D
Source§impl<'de> Deserialize<'de> for PhysicsMaterial2D
impl<'de> Deserialize<'de> for PhysicsMaterial2D
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PhysicsMaterial2D
impl RefUnwindSafe for PhysicsMaterial2D
impl Send for PhysicsMaterial2D
impl Sync for PhysicsMaterial2D
impl Unpin for PhysicsMaterial2D
impl UnwindSafe for PhysicsMaterial2D
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more