I'm using wheel colliders on a vehicle model and if I don't rotate the wheels the car lands on the ground and it works fine. However, as soon as I start rotating the wheels around the axel, the car goes through the ground. I heard wheel colliders are infinitely thin and can have this issue, but why only when I rotate them?
What are some solutions I can implement to fix this?
Thanks in advance.
asked Feb 26 '11 at 06:45 AM
You must NOT rotate the WheelCollider components. They must stand perpendicular to the floor. WheelColliders are implemented as a ray pointing down (the ray you see crossing the circle while in Editor).
You must place the WheelCollider component and the MeshRenderer component (the one that rotates) in separate gameobjects. Then you should only rotate the gameobject with the mesh.
The gameObject with the WheelCollider must be "fixed" regarding the gameobject containing the RigidBody. Use the properties at the WheelCollider for suspension traction / braking / steering.
Edit: here you can see a correct basic hierarchy for using WheelColliders: http://answers.unity3d.com/questions/31160/wheelcollider-requires-an-attached-rigidbody-to-function
answered Feb 28 '11 at 07:27 AM