Wheel collider falls through the floor in a skateboard?

Problem: Why are the wheel colliders not colliding with the floor?

Here’s a video that shows how the skateboard just falls through the ground:

I have this kind of hierachy:

  • GameObject “Skateboard” with Rigidbody
    • 4 wheel collider gameobjects with Wheel Collider components
    • skateboard mesh
      • 4 wheel meshes
      • board mesh WITH box collider

Here are the settings for each wheel collider:

The wheels are pointing down and rotation is set to (0,0,0):

I’ve played with multiple different configurations for the collider components and rigidbody of the skateboard, and I can’t figure out why it is happening.

The WheelColliders seem to be upside down. Therefore, they’re not detecting the ground. The direction of the detection is the small circle on top of the WheelCollider gizmo. As this small circle is in the upper part of the larger circle, it means they’re pointing “up”.

image

WheelCollider components always follow the “down” direction with respect to the rigidbody they belong to, reglardess their own Transform. As in this vehicle they’re pointing up, it means that the Rigidbody itself, and the entire vehicle, is upside down.

Solution:

  1. Modify the Transform of the Rigidbody to turn it upside down. The vertical direction of the vehicle (green arrow) must point up.
  2. Modify the local Transform of the visual skateboard to turn it upside down, so it visually looks correct again.
  3. Re-adjust the positions of the WheelColliders to the updated positions of the visual wheels. The small green circle must now be at the lower part of the larger circle.