# 2D Motocross physics

I'm looking into making a 2D motocross bike game with plausible physics.

It should look like this:

For a first try, I've created only the player (a motocross driver) and the map (consisting of only straight lines; no curves, to keep it simple).

How should collisions between the motocross bike and the track affect the bike's position and velocity? The bike should rotate if only one of the wheels touches the ground and speed up if the back wheel touches the ground. Pretty standard bike game stuff.

How do I achieve this behaviour?

-

I would first focus on the general motorcycle physics.

But because there are a lot of forces at work in the real world and you don't want to simulate them all, I would go for some basic forces like gravity, friction and torque.

You can use the torque to calculate the motion of the wheels of the motorcycle. And you can use the friction to let the wheels of the motorcycle have grip on the ground and make them stop spinning when you don't have a external force on your motorcycle (gravity, thrust etc.)

Also when you want to have ragdoll like behavior for your driver you can use inverse kinematics.

I hope you can do something with this information!

-
– Anko Mar 12 '13 at 11:34
Oh sorry, I didn't know that. – tversteeg Mar 12 '13 at 11:35
That's OK. Links are still helpful. It would be great if you could extract the essential points from the links into your answer. – Anko Mar 12 '13 at 11:38