Cloth
Capes that swing, flags that flap, sheets that drape. Put a Cloth under a mesh, pin one edge and press Play.
A Cloth makes the MeshPart it sits under hang and move like cloth in Play and renders; Edit doesn't simulate. Vertices on its Pin side stay on the MeshPart, so weld the MeshPart to a body part and the cape follows it. The rest swings under gravity and Wind and collides with the parts around it; Stiffness and Bend set how it stretches and folds. Every run gives the same frames. Bake the DataModel to keep them.
Properties
| Name | Type | Default | Description |
|---|---|---|---|
| Bend | number | 0.1 0 to 1 | How it folds: 0 folds freely, 1 is like paper. |
| Damping | number | 0.1 0 to 10 | Air drag on the cloth. |
| Enabled | boolean | true | |
| Pin | ("Top" | "Bottom" | "Left" | "Right" | "Front" | "Back" | "None") | "Top" Top, Bottom, Left, Right, Front, Back, None | The side whose vertices stay on the MeshPart; weld the MeshPart to a body part and the cape follows it. |
| PinDepth | number | 0.05 0 to 1 | The depth of the pinned band on the Pin side, as a fraction of the part's size. |
| Stiffness | number | 0.9 0 to 1 | How it stretches: at 1 it doesn't stretch at all. |
| Thickness | number | 0.05 0 to 10 | How far it stays off the parts it collides with. |
| Turbulence | number | 0 0 to 1 | Deterministic gusts that push each face along its normal. |
| Wind | Vector3 | 0, 0, 0 | Wind in studs per second, in world space, pushing each face along its normal. |
| Status | read-only text | Properties window only | After a Bake, says whether it plays the bake or needs a Free bake to simulate. |
Methods
| Name | Arguments | Returns | Description |
|---|---|---|---|
| UseClothSheet | () | boolean | Gives the MeshPart a 32 x 32 grid Cloth sheet; shown only when its mesh is too coarse to fold. |
