Unity 5 - Wheelcolliders sinks into the ground

After updating from unity 4 to unity 5, I’ve been having lots of problems with the wheelcolliders.

I’ve been reading across google and these forums, and many says they are bugged.

My problem is, as the title describe, they sink into the ground.
It was working some time ago, but now it messed up.

Here’s what it looks like:

Anyone knows how to fix this?
Could it be caused by the center of mass?

Please feel free to ask for additional info.

While I initially thought the wheel colliders were broken, I now dont think that in the slightest!

your setup looks fine, although its not 100% clear. I assume all your physics layers are set correctly, and the terrain/whatever its sitting on has colldiers etc?

I don’t know what you mean by physics layers?

The ground is a big box collider.

By the way, aren’t the small spheres supposed to be just beneath the initial wheelcollider?

Hmm… This doesn’t look right?..

Generally what I found when I upgraded was that the suspension and slip settings have all been completed changed in U5, and the old settings were incorrect.

If you just add wheel colliders and dont modify them at all, do you get the behaviour?

That fixed it yes, but I really need the current suspension and slip settings, cause it’s a forklift. It should be really stiff, and don’t rock that much sideways when driving.

Edit: It does not “fix” it. It just makes it wierd to drive because of the suspension settings.

ok, thats a good start, so next step is tweeking the settings to find what works.

Start with the suspension, increase the spring/damper settings.

These values are affected by rigidbody mass. I would start with a fairly standard 1000 kg (1 tonne).

start with 1000 for spring, 500 for damper, increase until you find values that work.

Well I have the settings that simulates the best physics.

Is this problem related to the settings?

Compare your settings to default settings and see where the differences are. Generally the answer would be yes, its related to your settings.

I don’t know what you mean by settings that simulate best physics. Are you talking real-world numbers?

I go for what feels realistic when im playing the game.

What I mean is, I’ve configured the spring and dampener to be as close to a forklift’s real world properties. I just typed in some numbers until I felt like it felt realistic.

So the only thing I’ve changed is the spring and dampener

It just occured to me that the reason it looks like it is sinking into the ground is because youre probably not updating the wheel mesh position, so it doesnt match what the collider is doing…

So I should GetWorldPose, and then apply it to the wheel mesh?

yes.

Sorry for the late reply. That did not fix it.

Didnt fix the wheel colliders sinking into the ground?

Can you show me the code?

It is 4:40 AM at my place so I’ll get some sleep. I can send the code when I wake up, although I do not have anything that changes the mesh or collider’s position or settings.

Do you still want the code?

Rotation of your wheel collider or parent elements seems to be wrong. The “small spheres” should be exactly in the center and at the bottom of your wheel colliders/wheels.

Yes, I was suspecting this, although the inspector indicates 0 rotation on all axes. Both the parent and the wheels. Could this be something in blender, if yes, how should i fix this? Blender shows 0 rotation too.