class nape.constraint.MotorJoint extends Constraint
Available on all platforms
MotorJoint constraining the angular velocities of two bodies
*
* The equation for this constraint is:
*
* (ratio * body2.angularVel) - body1.angularVel = rate ** This constraint operates only on the velocities of objects.
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.
function new(body1:Null<Body>, body2:Null<Body>, ?rate:Float = 0.0f, ?ratio:Float = 1.0f):Void
Construct a new MotorJoint * *
body1 | The first body in MotorJoint * |
body2 | The second body in MotorJoint * |
rate | The rate of motor. (default 0) * |
ratio | The ratio of the motor. (default 1) * |
returns | The constructed MotorJoint. |
function bodyImpulse(body:Body):Vec3
@inheritDoc
*
* For this constraint, only the z coordinate will be non-zero.