- Home /
Wheel Colliders make my car fly
Hello, as the title suggests, I'm trying to make a car in unity, and just added the wheel colliders. However, when I did that, the car flipped out and goes flying. I did a google search to find similar problems, and the solutions I found did not work. I tried going into the project settings, and changing the gravity from -9.8 to -20. I also ensured that my car's rigid body has a mass of 3000. Can someone shed some light as to what I'm doing wrong? :)
Thank you!
When does it flip out? Immediately at start? When you attempt to move the car forward? When it collides with something?
I haven't actually used the Wheel Collider, but after reading through the documentation, I think it is because of your suspension spring settings. Try something like the documentation has maybe?
Spring: 1 Damper: 0 Target Position: 0.5
It does it when the scene loads. I haven't even added in any script yet. When I tried adjusting to those settings, the car dances backwards ins$$anonymous$$d of flipping out.
Answer by Marshal_Alessi · Dec 15, 2015 at 10:42 PM
Alright all, I fixed the problem, but I'm not sure exactly what it was that I did to fix it. So for future reference, if anyone is reading this post, these are the steps I took. I went back, and deleted all of the wheels except for one, and re-added them into an empty game objects(centered around the car) and placed them all in them. Then, I duplicated all of the wheels, but deleted the duplicates actual mesh, leaving just the empty game object that is now centered at each tire. From there, I simultaneously added wheelcolliders to the wheels, and adjusted their size to fit the car. And voila, my car no longer floats, and with my added script can drive.
Answer by Speedomon · Jun 11, 2021 at 07:33 PM
You should check if another collider from your car collides with the wheel collider. It was the problem in my case.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Wheel Collider Rotation 0 Answers
Car trembling when reaching a certain speed 1 Answer
A real head-scratcher 0 Answers