init(mesh:meshDraping:)
Creates a new cloth body component.
Declaration
init(mesh: ClothMeshResource, meshDraping: ClothPoseResource? = nil)Parameters
- mesh:
The (simulation) mesh of the cloth body, which defines its at-rest shape.
- meshDraping:
An optional initial pose for the body.
Discussion
The body component must be attached to an entity that is a descendant of a simulation root (an entity with a ClothSimulationComponent) in order to be active.