Physical Bike!

  • 56 favourites



7,548 visits, 20,020 views



This tutorial hasn't been translated.


This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Physical Environment

I found, that the behavior controlls do not help to simulate a natural behavior of a bike, so I added some "gravity" every tick:

As you may notice, I apply a downforce on an imagepoint, that is represented by the global variable schwerpunkt. This is the weight controll described earlier.

These are the vaild imagepoints:

The small upward force, that is applied to the springimagpoint simulates the rear suspension of the bike.

Now, you could let go of the whole thing and it would stand straight on the ground.


When riding a powerfull bike, you have to be carefull, not to flip over if you accelerate to fast. This is due to the torque generated by the engine applie to the back wheel and to the body as well.

This is exactly what I am trying to simulate with the following code:

You can see, that I use the BackTouchSensor to check if the rear wheel is on the ground. If so, and the total velocity of the bike is smaller then 300 torque is also applied to the body of the bike, causing it to rise in the front.

If you remove the speedrestriction, the bike will very easy backflip. You may want to play around with this value!


  • Order by
Want to leave a comment? Login or Register an account!