title: How to add torque to a rigidbody until it's angular velocity is 0?
body: <p>I'm trying to figure out how to stop the rotation of a rigidbody using inertia in Unity 3D. This is how I assumed it should be done, but when I ran it, it crashed Unity and I had to kill the process. </p>
  
  <pre><code>        while(rigidBody.angularVelocity.magnitude != 0) {
              rigidBody.AddTorque(-transform.up * REACTION_WHEEL, ForceMode.Impulse);
          }
  </code></pre>
  
  <p>So how would I go about adding torque to a rigidbody to bring it from any degrees/second to 0?</p>