class nape.constraint.PivotJoint extends Constraint
Available on all platforms
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.
Instance Fields
Anchor point on first Body.
*
* This anchor point is defined in the local coordinate system of body1.
Anchor point on second Body.
*
* This anchor point is defined in the local coordinate system of body2.
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.
Second Body in constraint.
*
* This value may be null, but trying to simulate the constraint whilst
* this body is null will result in an error.
function new(body1:Null<Body>, body2:Null<Body>, anchor1:Vec2, anchor2:Vec2):Void
Construct a new PivotJoint. * *
body1 | The first body in PivotJoint. * |
body2 | The second body in PivotJoint. * |
anchor1 | The first local anchor for joint. * |
anchor2 | The second local anchor for joint. * |
returns | The constructed PivotJoint. |