I had the same problem. The solution is simpler than the other answer suggests:
WheelCollider objects are dependent on the orientation of a rigid body they are attached to. Assuming that your bike has a rigid body, the solution is to make sure that the X-axis orientation of the bike matches the X-axis orientation of the wheel colliders.
Based on this post:
https://forum.unity.com/threads/unity-5-wheelcollider-wrong-rotation.349596/#post-2264801
WheelColliders always point in the "forward" and "down" direction as the rigidbody they're attached to. The steerAngle value is relative to the rigidbody's forward direction.
Please bear in mind, however, that your bike's model(the visuals that display bike's frame) might have a different orientation from the object that contains the rigidbody that wheel colliders are attached to.
In my case Hierarchy looked like so:
- MainScene
- CarRoot
- CarModel
- WheelColliders
- Wheel_FR
- Wheel_FL
- Wheel_RR
- Wheel_RL
The CarRoot had a rigid body on it. When I rotated it, that would also rotate my model. Which was not good. So I had to:
- Unparent the CarModel and WheelColliders(made them children of MainScene)
- Rotate the CarRoot by 90 degrees on the Y-axis(to align its X-axis with that of the WheelColliders)
- Make CarModel and WheelColliders children of CarRoot again.
That did it for me.