applyTorque method
void
applyTorque(
- Vector3 torque
Apply torque to the body. @param torque The amount of torque to add.
Implementation
void applyTorque(Vector3 torque){
if (type != BodyTypes.dynamic) {
return;
}
if (sleepState == BodySleepStates.sleeping) {
wakeUp();
}
// Add rotational force
this.torque.add2(torque, this.torque);
}