null
.Modifies the spring properties after the constraint has been created.
Object, describing spring settings.
Modifies maximum friction force after the constraint has been created.
Max friction force (N m).
If a motor is used, returns the motor settings that were used when constraint was created. You cannot create a motor after the constraint has been created - you can only modify existing one.
Override for the number of solver position iterations to run. If set to 0
, the constraint
will use global default set by Physics initialization setting
JoltInitSettings.numPositionSteps.
Override for the number of solver velocity iterations to run. If set to 0
, the constraint
will use global default set by Physics initialization setting
JoltInitSettings.numVelocitySteps.
Destroy this constraint. The connected bodies will be activated.
Allows to enable/disable a constraint without destroying it.
true
- enable constraint, false
- disable.
Optional
activate: boolean = trueIf true
, activate connected bodies after changing the state.
Update the rotation limits of the hinge after the constraint has been created.
Lower limit of the hinge angle.
Upper limit of the hinge angle.
Changes the motor state, e.g. turn it on/off. Following aliases available:
MOTOR_STATE_OFF
MOTOR_STATE_VELOCITY
MOTOR_STATE_POSITION
MOTOR_STATE_POSITION
: Motor will drive to target position.MOTOR_STATE_VELOCITY
: Motor will drive to target velocity.Constant number, representing the state.
Sets a target angle for the motor to drive to. The motor needs to be operating in position mode. See setMotorState.
Number, radians
Sets motor's target angular velocity. The motor needs to be operating in velocity mode. See setMotorState.
Number, radians per second
Hinge constraint.