Bad Wheel Collider Collision Detection!

Hey guys,

I’ve got a small racing game up and running but I’ve noticed that sometimes when the car flips (after doing a jump or something) the wheels on one side go through the ground, where they remain stuck…

Any ideas?

This happens both on iPhone and Mac versions.

The WheelCollider is actually implemented with a raycast from the wheel’s centre. If the car moves sideways quite fast, the whole WheelCollider can move under the ground in less than a single frame time. Once underground, the collider hasn’t got anything underneath to collide with and just gets dragged along as if the wheel had broken off.

This usually happens when the wheel sticks out sideways from the main body collider of the car (you’d probably find this with a racing car, say). You can prevent it from happening by adding some extra colliders that stick out sideways, roughly along the wheels’ axles (these are sometimes called “ears”). You’d probably want capsule colliders with a radius about a quarter of the wheel’s radius. They should have a slippy physic material and be the same width as the wheel.

If you still find the wheels can duck under the ground, then try moving the WheelColliders inward slightly so that they are close to the centre line of the ears.

Thanks! I’ll give that a go.

Worked perfectly, thanks! Now my little truck can jump til his heart’s content.

I’m currently experiencing exactly what you are describing andeeee but can’t quite figure out what you are describing as a solution. I’ve tried placing (4) capsule colliders at the same position as my wheel colliders. My capsule colliders use the x-axis to take the shape of the wheel, but i’ve cut the radius of the collider to be smaller than the actual wheel. I’ve also placed these capsule colliders on the ‘ignore raycast’ layer in hopes of not interfering with the wheel colliders.

However, after doing these changes, my car now flips/spins around uncontrollably or just wont move at all at times. prior to these changes, the car drove great, just occasionally would get stuck in the meshcollider that is the track.

Any clarification would be extremely helpful.

i wonder that this problem still not resolved officially by Unity. This solution worked for me