- Home /
Having some issues with Unity inbuilt rigidbody collision physics.
I am making a 2D open world space shooter. I have a few asteroids around and want to make the ship be able to crash into them. I am trying to use Unity's built in physics system using polygon collider 2d and rigidbody2d. They impact fine. However, after impact the ship and the asteroid keep floating away and rotating the way they started to during the crash. Nothing I did stopped the ship from spinning. Any ideas on how to fix this? Thanks :)
(Note: I prefer C# over JS so if you have an idea involving code, plz use C# if possible.)
Answer by brunocoimbra · Jan 21, 2016 at 10:47 PM
http://docs.unity3d.com/Manual/class-Rigidbody2D.html
You can turn on the "Freeze rotation in Z" inside the Rigidbody2D constraints, that way it not start spinning forever.
That seemed to fix it. I also later found that turning up the angular drag made the crashes look a little bit more realistic but doing so had implications in other places in my game. Thanks :)
Your answer
![](https://koobas.hobune.stream/wayback/20220612061104im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Get Rigidbody2D component in script (c#) 1 Answer
Cube Gravity - Apply Gravity to a Curve 0 Answers