Skip to main content

Module cloth

Module cloth 

Source
Expand description

Cloth simulation: Verlet particles joined by structural, shear and bend links. Wind acts on each triangle by its area and orientation, so cloth billows and flaps. Links snap when stretched past tear, ground / sphere / box colliders make cloth drape and pile up.

Structs§

Cloth
Verlet cloth attached to an entity. Structural edits rebuild the particle grid; wind and other simulation controls can change while running.

Enums§

ClothPin
Pin no particles, the upper edge, the upper corners, or the left edge of the cloth.

Functions§

update
Advances every cloth and refreshes its DynamicMesh. With simulate false only the initial (rest) shape is built, which is what the editor shows outside Play mode. Simulation deltas are sanitized and limited to 0.1 seconds for solver stability. Cached world matrices are refreshed so same-frame transform edits are visible.