applyAngularImpulse method

void applyAngularImpulse (double impulse)

Apply an angular impulse.

@param impulse the angular impulse in units of kgmm/s

Implementation

void applyAngularImpulse(double impulse) {
  if (_bodyType != BodyType.DYNAMIC) {
    return;
  }

  if (isAwake() == false) {
    setAwake(true);
  }
  _angularVelocity += _invI * impulse;
}