Physics · interface
ClothLimits
Where a particle may not go, measured from where skinning puts it. Each optional, one entry a
particle (two for a stop), and Infinity is none — which is how cooked data says it.
Explained in Your first game, Rigid bodies.
interface ClothLimitsimport type { ClothLimits } from '@driftengine/physics';Properties
| Name | Type | Description |
|---|---|---|
maxDistancereadonlyoptional | Float32Array | Metres from the skinned position a particle may not leave: a sphere around it. |
backstopreadonlyoptional | Float32Array | A distance and a radius a particle: a sphere behind the skinned position, along its normal. |
frontstopreadonlyoptional | Float32Array | The same in front. |
thicknessreadonlyoptional | Float32Array | Metres a particle keeps from a collider's surface. |
selfCollisionreadonlyoptional | Uint8Array | Which particles collide with each other, one flag each. Accepted and not yet simulated: a garment held by its colliders and its backstops does not need it to look right, and the GPU solver has no neighbour search yet. Carried so a set-up need not be rewritten when it arrives. |