Skip to content

Vehicle Wheels and Body

This content is not available in your language yet.

Click on the ’+’ button to create a new scene, and name it car.tscn.

  1. Add a child VehicleBody3D node.

    Change its Mass to 200kgs.

  2. Add a MeshInstance3D and make a New BoxMesh. Change this to a car shape (my Size is (1.5, 0.5, 3)).

  3. On the menu bar Mesh button, create a collision shape. But this time,

    Collision shape placement is Sibling. This is because the car needs to not be static.

    Collision Shape Type is Simplified Convex.

  4. To change the colour of your car, go MeshInstance3D > Mesh > Material > New StandardMaterial3D > Albedo and change the colour.

  5. Save your scene.

In your main scene with the ground, drag your saved car scene into the Ground (the top) node.

VehicleBody3D with colour

  1. Add a child VehicleWheel3D node to VehicleBody3D and rename it to “FrontLeftWheel”.
  2. Using the X, Y, Z axes adjust the wheel location to be just outside the vehicle body.
  3. In the Inspector:
    • Under VehicleBody3D Motion tick
    • Under Wheel change the Roll Influence to 1.0 (to keep the car from flipping over) Radius to 0.4m and Friction Slip to 4 (1 is normal grip, higher means more grip).
    • Under Suspension set Stiffness to 50 (or a value between 50 and 100 for a race car).
    • Under Damping set Compression to 0.5 (0.0 will make the car bounce through its’ springs, we want less bounce for a race car).
  4. Add a child MeshInstance3D node and create a New CylinderMesh.
    • By clicking on the mesh instance, change the Top & Bottom Radius to the same as the Wheel Radius (0.4m).
    • Change the Height to 0.3m.
    • Under the MeshInstance3D > Tranform, set the Rotation z to 90 degrees.
  5. Duplicate this wheel (CTRL/CMD D). Under the Transform tab, change the x-position to the negation of the current number. Rename it to “FrontRightWheel”.
  6. Select both these wheels and duplicate again, this time changing the z-position to its’ negation. Rename them to “BackRightWheel” and “BackLeftWheel”.
  7. Set the back wheels’ VehicleBody3D Motion to tick

VehicleBody3D with wheels and colour

Contribute Donate