pub struct Cloth {Show 25 fields
pub m_BendingStiffness: f32,
pub m_CapsuleColliders: Vec<PPtr>,
pub m_Coefficients: Vec<ClothConstrainCoefficients>,
pub m_CollisionMassScale: f32,
pub m_Damping: f32,
pub m_Enabled: u8,
pub m_ExternalAcceleration: Vector3f,
pub m_Friction: f32,
pub m_GameObject: PPtr,
pub m_RandomAcceleration: Vector3f,
pub m_SleepThreshold: f32,
pub m_SolverFrequency: Enum_u32__f32,
pub m_SphereColliders: Vec<Enum_ClothSphereColliderPair___PPtr__PPtr>,
pub m_StretchingStiffness: f32,
pub m_UseContinuousCollision: bool,
pub m_UseGravity: bool,
pub m_UseTethers: bool,
pub m_WorldAccelerationScale: f32,
pub m_WorldVelocityScale: f32,
pub m_SelfAndInterCollisionIndices: Option<Vec<u32>>,
pub m_SelfCollisionDistance: Option<f32>,
pub m_SelfCollisionStiffness: Option<f32>,
pub m_UseVirtualParticles: Option<bool>,
pub m_VirtualParticleIndices: Option<Vec<u32>>,
pub m_VirtualParticleWeights: Option<Vec<Vector3f>>,
}Expand description
Cloth is a class of the Unity engine since version 5.0.0f4. Exert from Unity’s scripting documentation: The Cloth class provides an interface to cloth simulation physics.
Fields§
§m_BendingStiffness: f32Bending stiffness of the cloth.
m_CapsuleColliders: Vec<PPtr>An array of CapsuleColliders which this Cloth instance should collide with.
Vec<PPtr<CapsuleCollider>>: (5.0.0f4 - 2022.3.2f1)
m_Coefficients: Vec<ClothConstrainCoefficients>The cloth skinning coefficients used to set up how the cloth interacts with the skinned mesh.
m_CollisionMassScale: f32How much to increase mass of colliding particles.
m_Damping: f32Damp cloth motion.
m_Enabled: u8Is this cloth enabled?
m_ExternalAcceleration: Vector3fA constant, external acceleration applied to the cloth.
m_Friction: f32The friction of the cloth when colliding with the character.
m_GameObject: PPtrThe game object this component is attached to. A component is always attached to a game object.
PPtr<GameObject>: (5.0.0f4 - 2022.3.2f1)
m_RandomAcceleration: Vector3fA random, external acceleration applied to the cloth.
m_SleepThreshold: f32Cloth’s sleep threshold.
m_SolverFrequency: Enum_u32__f32§m_SphereColliders: Vec<Enum_ClothSphereColliderPair___PPtr__PPtr>An array of ClothSphereColliderPairs which this Cloth instance should collide with.
Vec<(PPtr<SphereCollider>, PPtr<SphereCollider>)>: (5.0.0f4 - 2019.1.0a10); Vec
m_StretchingStiffness: f32Stretching stiffness of the cloth.
m_UseContinuousCollision: bool§m_UseGravity: boolShould gravity affect the cloth simulation?
m_UseTethers: boolUse Tether Anchors.
m_WorldAccelerationScale: f32How much world-space acceleration of the character will affect cloth vertices.
m_WorldVelocityScale: f32How much world-space movement of the character will affect cloth vertices.
m_SelfAndInterCollisionIndices: Option<Vec<u32>>Vec
m_SelfCollisionDistance: Option<f32>Minimum distance at which two cloth particles repel each other (default: 0.0). f32: (2017.3.0b1 - 2022.3.2f1)
m_SelfCollisionStiffness: Option<f32>Self-collision stiffness defines how strong the separating impulse should be for colliding particles. f32: (2017.3.0b1 - 2022.3.2f1)
m_UseVirtualParticles: Option<bool>Add one virtual particle per triangle to improve collision stability. bool: (5.0.0f4 - 2022.3.2f1)
m_VirtualParticleIndices: Option<Vec<u32>>Vec
m_VirtualParticleWeights: Option<Vec<Vector3f>>Vec