How to disable collisions without disabling rigidbody?

When my enemies die I am applying torque to their rigid bodies so that they spin, but I want to then prevent the player from being able to collide with them. Anything I do seems to also disable the torque I am applying. I tried disabling the collider, which didn’t work. I also tried setting the collider to be a trigger, and that didn’t work.
How would I make my rigidbody still move around with it’s existing momentum, but just not be affected by anything colliding with it?

In your code while the enemy spins:

Collider.enabled = false;
Rigidbody.velocity = Vector3.zero;

In your rigidbody settings in the inspector make sure that Angular Drag is set to 0 so the enemy doesn’t slow down when spinning.


You can also try disabling the rigidbody and use an Animation or Rotate the Transform for the spin.