Wheel Collider Help

Hi, I’m looking for some help with Wheel Colliders. I’m so close to pulling my hair out. I can get wheel colliders to work quite well on a simple cube, but then when I transfer those wheel colliders (and adjust their position as necessary etc) to a model, the model just starts bouncing all over the place erratically when I test. They aren’t my models, just a couple of freebies I downloaded.

Am I doing something obviously wrong? I’ve scoured Google for hours and found nothing of relevance.

Do you have a large collider over the mesh?

No, the only collider’s on the object are the four wheel collider’s at the minute

I think that’s your problem. The car mesh should be in a gameObject with a rigidBody and an all over collider/s. A simple box collider above the wheel colliders will do. The rigidBody uses the collider to establish the center of gravity etc. and the sprung load on the wheel colliders. I think that’s how it works. You can also manually set the rigidBody center of gravity lower on a car with code to keep it more stable.

1 Like

I’m pretty sure I did try it with a box collider too - I’ll have a bit more play about with a collider for the model tonight when I get in.

Just tried with a box collider, and also a mesh collider. Still not playing ball…

Are you applying a mass to your rigidBody that relates to real world weight?
I have an airplane with Mass: 650. It has 3 wheel colliders. The main front ones have a Mass: 20 and with Spring: 35,000 and Damper: 10,000.

1 Like

Yeah, I have the rigidbody set at 1000, with wheel colliders set to 20. I have tried various different figures though and none seem to make a difference. Is there somewhere perhaps where I can post my project for you to take a look at?

It’s a common problem with wheel colliders jumping all around the place. I’m sure if you do some searching there will be other posts with examples.

I’ve really searched high and low and can’t find anything about what I’m experiencing. The few fixes I’ve come across that loosely relate haven’t helped. I’m at wit’s end with it.

Sounds like you dont have a collider on the car body.

try the script in my sig. might help

Ok I’ve managed to stop it spinning around like crazy with a couple of box colliders on the body. Thing is now, the left wheels seem to be compressing under suspension but the right wheels aren’t therefore it’s leaning to the left.

Scratch that, I had suspension set to 0.6, changed it to 0.2 and that issue seems to be resolved. Now just got to figure out how to make the wheels do what the colliders are doing. Thanks for your help guys!