First body (defines the line), or null for a static world line.
Second body (slides along the line), or null for a static anchor.
Origin of the line in body1's local space (disposed if weak).
Anchor on body2 in body2's local space (disposed if weak).
Direction of the line in body1's local space (disposed if weak).
Minimum allowed displacement along the line.
Maximum allowed displacement along the line.
The set of CbTypes assigned to this constraint. Used to filter which listeners respond to this constraint's events.
Whether the constraint's simulation component is currently sleeping.
Only valid when the constraint is active and in a space — throws otherwise.
Maximum displacement along the line direction.
Minimum displacement along the line direction.
Arbitrary user data attached to this constraint.
Lazily initialized to {} on first access.
Creates and returns a copy of this constraint with the same parameters. The copy is not automatically added to a space.
Invokes fn once for each distinct body linked to this constraint.
Line joint — constrains
body2's anchor to slide along a line defined bybody1's anchor anddirection, within[jointMin, jointMax].The direction is specified in
body1's local space. The joint allows one translational degree of freedom (along the line) and removes the other.Example
Fully modernized — uses ZPP_LineJoint directly (extracted to TypeScript).