First body participating in the constraint.
Second body participating in the constraint.
Set to true if you want the connected bodies to collide.
true
The distance to keep between the anchor points. Defaults to the current distance between the bodies.
Equations to be solved in this constraint
The anchor point for bodyA, defined locally in bodyA frame. Defaults to [0,0].
The anchor point for bodyB, defined locally in bodyB frame. Defaults to [0,0].
The lower constraint limit.
If the lower limit is enabled or not.
Maximum force to apply.
Current constraint position. This is equal to the current distance between the world anchor points.
The type of constraint. May be one of Constraint.DISTANCE, Constraint.GEAR, Constraint.LOCK, Constraint.PRISMATIC or Constraint.REVOLUTE.
The upper constraint limit.
If the upper limit is enabled or not.
Static
DISTANCEStatic
GEARStatic
LOCKStatic
OTHERStatic
PRISMATICStatic
REVOLUTE
Constraint that tries to keep the distance between two bodies constant.
Example
Example