How do I model a bike's physics?

Hi, I'm struggling a bit with modelling the physics for a pedal bike in Unity. I have set up a wheel-collider in an empty game object for each of the wheels. Thinking about the real world physics, it would make sense to apply the motion torque only to the back wheel, and steer with the front, but that doesn't appear to work. So applying motion torque to the front wheel and steering with it kind of works in that it changes the direction of the bike, but the bike itself remains parallel with it's starting position and doesn't turn to follow where the bike is heading.

Is what I want to do possible with wheel-colliders, or should I be looking at alternatives? I remember seeing a Unite presentation with the guys from Blurst who said they gave up on wheel-colliders and rolled their own raycast based solution for Raptor Safari.



I think wheel colliders would be fine as a start, but you're almost definitely going to have to do a certain amount of "fake" physics tweaking to get the bike to stay upright, and to get it to lean the correct amount to give a realistic turning effect, because it will be incredibly difficult to make it maintain these positions as a natural emergent result of the physics engine.

This means you probably can't just let the user apply force, and steer the front wheel. I think you're going to have to implement virtual training wheels of some description!

I might have had freeze rotation on on the rigidbody ... oops!