applyAngularImpulse method

void applyAngularImpulse(
  1. double impulse
)

Apply an angular impulse.

angular impulse in units of kgmm/s

Implementation

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

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