- Home /
Help with car collision in arcade racing game
Hi all
I need help with my car game, the cars keep spinning out with small collisions (see attached picture)
Is there a way I could set it up so that if a car hits an opponent car, the rotation on the y axis wont be effected?
Thanks in advance!
Answer by BiG · Dec 21, 2011 at 07:50 AM
Yes, but I'm assuming that your game is a very arcade one, with no curves on the track: something like Spy Hunter (otherwise, I wouldn't see a reason for your request). I also assume that your cars have a rigidbody attached. Under the "Rigidbody" voice in the Inspector, go under Collision Detection->Freeze Rotation and check the Y box. For a complete reference, go at this link.
Thanks, but that's not really what I'm looking for, there are curves in my tracks, I just want other cars to not change the rotation. The cars spin out way too easily and it ruins the game.
Answer by Nightkilla · Nov 03, 2013 at 06:41 PM
Create a new Physic Material, make the friction 0, then apply the physic material to the box collider on the cars.
Your answer
![](https://koobas.hobune.stream/wayback/20220613062237im_/https://answers.unity.com/themes/thub/images/avi.jpg)