PivotJoint constraining two anchors points of bodies to be equal.
The equation for this constraint is:
body2.localPointToWorld(anchor2) = body1.localPointToWorld(anchor1)You may view this constraint as being equal to the DistanceJoint constraint when both its jointMin and jointMax are exactly 0 (In such a case a DistanceJoint becomes degenerate). Compared to the DistanceJoint this is a 2 dimensional constraint.
Constructor
Variables
anchor1:Vec2
Anchor point on first Body.
This anchor point is defined in the local coordinate system of body1.
anchor2:Vec2
Anchor point on second Body.
This anchor point is defined in the local coordinate system of body2.
body1:Null<Body>
First Body in constraint.
This value may be null, but trying to simulate the constraint whilst
this body is null will result in an error.