class nape.constraint.AngleJoint extends Constraint
Available on all platforms
AngleJoint constraining the relative angles of two Bodies.
*
* The equation for this constraint is:
*
* jointMin <= ratio * body2.rotation - body1.rotation <= jointMax *
Instance Fields
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.
Upper bound for constraint.
*
* This value must be greater than or equal to jointMin.
*
* @default infinity
Lower bound for constraint.
*
* This value must be less than or equal to jointMax.
*
* @default -infinity
function new(body1:Null<Body>, body2:Null<Body>, jointMin:Float, jointMax:Float, ?ratio:Float = 1.0f):Void
Construct a new AngleJoint. * *
body1 | The first body in AngleJoint. * |
body2 | The second body in AngleJoint. * |
jointMin | The lower bound for constraint. * |
jointMax | The upper bound for constraint. * |
ratio | The ratio of joint (default 1) * |
returns | The constructed AngleJoint. |
function bodyImpulse(body:Body):Vec3
@inheritDoc
*
* For this constraint, only the z coordinate will be non-zero.