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.
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.
Motor joint — drives the relative angular velocity between two bodies toward a target
rate, subject tomaxForce.The motor enforces:
body2.angularVel - ratio * body1.angularVel → rateThis is a velocity-level constraint (not positional), so it does not enforce a particular relative angle — it continuously applies torque to reach
rate. Use an AngleJoint in addition if you also need an angle limit.Example
Fully modernized — uses ZPP_MotorJoint directly (extracted to TypeScript).