Physical Bike!

3
  • 56 favourites

Index

Stats

7,927 visits, 20,801 views

Tools

Translations

This tutorial hasn't been translated.

License

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.

Acceleration

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!

  • 2 Comments

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