applyTorque method

void applyTorque (double torque)

Apply a torque. This affects the angular velocity without affecting the linear velocity of the center of mass. This wakes up the body.

@param torque about the z-axis (out of the screen), usually in N-m.

Implementation

void applyTorque(double torque) {
  if (_bodyType != BodyType.DYNAMIC) {
    return;
  }

  if (isAwake() == false) {
    setAwake(true);
  }

  torque += torque;
}