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 ClothLimits
import type { ClothLimits } from '@driftengine/physics';

Properties

NameTypeDescription
maxDistancereadonlyoptionalFloat32ArrayMetres from the skinned position a particle may not leave: a sphere around it.
backstopreadonlyoptionalFloat32ArrayA distance and a radius a particle: a sphere behind the skinned position, along its normal.
frontstopreadonlyoptionalFloat32ArrayThe same in front.
thicknessreadonlyoptionalFloat32ArrayMetres a particle keeps from a collider's surface.
selfCollisionreadonlyoptionalUint8ArrayWhich 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.