Wheel Colliders: Why is my object tilting and ignoring gravity

84 Views Asked by At

I have a simple car object which is just one solid block. I Haven't got any behaviour scripts on it, just a generic script that allows it to register damage and be destroyed. This behaviour is unique to the relationship between the object and the wheel colliders.

enter image description here

I attached 4 colliders, equal distance apart from eachother in an empty game object, and made that a child of my car object (this has worked before, but has also caused problems before).

The object randomly tilts, first back on to the hind wheels, then i rotated it, and it's tilting to side. If I move it in scene and let the game run it will return to this irregular position.

The wheels are identical, the placement symmetrical, The object hitbox is just a box, no mesh collision or anything sophisticated. Why is it doing this?

Also, when I ram the object with my player, it will float, or be immovable. It will sometimes ignore gravity, or just tilt like it is here.

I have done this with other objects with no problem, but I feel like every time I use wheel colliders I am rolling a dice with how random these errors are. Any advice as to what could cause this and why it's so inconsistent.

enter image description here

1

There are 1 best solutions below

0
On

I was able to reproduce your problem using the Suspension Spring values shown in your image. Seems to be some kind of bug when the Spring and Damper values are too low. Increasing them by around 5-10x should make your wheels behave more correctly. (Tested using Unity 2022.3)