pub struct PhysicMaterial {
pub bounceCombine: i32,
pub bounciness: f32,
pub dynamicFriction: f32,
pub frictionCombine: i32,
pub m_Name: String,
pub staticFriction: f32,
pub dynamicFriction2: Option<f32>,
pub frictionDirection2: Option<Vector3f>,
pub staticFriction2: Option<f32>,
}Expand description
PhysicMaterial is a class of the Unity engine since version 3.4.0. Exert from Unity’s scripting documentation: Physics material describes how to handle colliding objects (friction, bounciness). See Also: Collider.
Fields§
§bounceCombine: i32Determines how the bounciness is combined.
bounciness: f32How bouncy is the surface? A value of 0 will not bounce. A value of 1 will bounce without any loss of energy.
dynamicFriction: f32The friction used when already moving. This value is usually between 0 and 1.
frictionCombine: i32Determines how the friction is combined.
m_Name: StringThe name of the object.
staticFriction: f32The friction coefficient used when an object is lying on a surface.
dynamicFriction2: Option<f32>f32: (3.4.0 - 5.1.5f1)
frictionDirection2: Option<Vector3f>Vector3f: (3.4.0 - 5.1.5f1)
staticFriction2: Option<f32>f32: (3.4.0 - 5.1.5f1)
Trait Implementations§
Source§impl Debug for PhysicMaterial
impl Debug for PhysicMaterial
Source§impl<'de> Deserialize<'de> for PhysicMaterial
impl<'de> Deserialize<'de> for PhysicMaterial
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 PhysicMaterial
impl RefUnwindSafe for PhysicMaterial
impl Send for PhysicMaterial
impl Sync for PhysicMaterial
impl Unpin for PhysicMaterial
impl UnwindSafe for PhysicMaterial
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