Create car physics

2

Index

Stats

11,689 visits, 29,560 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.

Published on 13 Jun, 2012. Last updated 19 Feb, 2019

Create top-down car physics

To create your own top-down car physics (car seen from above), you need

to do some first steps to get it working:

Step 1.

You need a body (the actual car) and four (4) wheels.

The size and position of the wheels in relation to the car body, may

cause different reactions from the physics car in the end, so make sure

you position the wheels as you want them to be.

Looking at the wheels, they need to be able to rotate around their own axle later on. How do you know they are able to rotate around their own axle? Look at this screenshot:

Looking at the right, front wheel, you see its highlighted. And in the middle, pointing out to the right, is the action handle that allows you to rotate the wheel in any direction you wish. This action handle MUST point to the one of the sides of the car, because this is the point of rotation.

It needs to be like this because later on when its physicalized, the physics rotates the wheel around this point, and if its wrong, the wheel wont turn correctly and the car behavior will be wrong.

Step 2.

Add Physics behavior to the car body and all wheels.

The car physics behavior uses the existing physics world created by

Construct, in order to be able to react to other physics objects.

So before you add the car physics behavior, you must make sure all car

parts do have the physics behavior.

When all parts have the physics behavior, you can add the Car Physics behavior to the car body, and the car body only! The wheels don't need, and shouldn't have the behavior.

Step 3.

Add the top-down car physics to the car body with the

"Create top down 2WD car physics" action.

Its important that you add the right wheel to the correct inparameter!

Adding back right wheel to where the front left wheel should be in the action menu, will cause issues later on!

Step 4.

Now the last but longest step, is the car physics settings!

Now the car and wheels are merged together and have created a car with

fully integrated into the physics world! But it might not drive very well or at all. Now its time to play around with the settings.

Looking at this screenshot, the red box shows what settings you should work with when using the top-down car physics.

It might look confusing at first, but take your time and test each setting to get it as you like. Some of these settings you can change in-game. Look in the action list to see which settings you can change in real time.

So now you have a fully and functional top-down car physics! Congratulations! Just make sure you test and test and test all settings

to get that individual car that you want to have.

Take a look at this simple example to see the top-down car physics in action. (Remember that you need to download and install the Car Physics behavior before you can see the example)

Download example

  • 1 Comments

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