MotorJoint
Constraint → nape.constraint.MotorJoint (final class)
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 Members
@private
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.
MotorJoint ratio.
@default 1
MotorJoint rate
@default 0
@inheritDoc
For this constraint, the MatMN will be 1x1.
Returns |
---|
nape.geom.MatMN |
@inheritDoc
For this constraint, only the z coordinate will be non-zero.
Name | Type |
---|---|
body |
nape.phys.Body |
Returns |
---|
nape.geom.Vec3 |
@inheritDoc
Name | Type |
---|---|
lambda |
Function |
nape
new(body1: Null<nape.phys.Body>, body2: Null<nape.phys.Body>, ?rate: Float = 0.0, ?ratio: Float = 1.0): Void
Construct a new MotorJoint
Name | Type | Default | Description |
---|---|---|---|
body1 |
Null<nape.phys.Body> | The first body in MotorJoint | |
body2 |
Null<nape.phys.Body> | The second body in MotorJoint | |
rate |
Float | 0.0 |
The rate of motor. (default 0) |
ratio |
Float | 1.0 |
The ratio of the motor. (default 1) |
Private Members
Metadata
Name | Parameters |
---|---|
:final |
- |