confusion about VehicleBody and wheels

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By 1izNoob

So I am trying to figure out how the VehicleBody works, and my setup is this right now:


  • Meshinstance of a car
  • VehicleWheel (4x for each wheel, and each has a mesh instance of a wheel as child)
    (Also, all the VehicleWheels are pointing backwards and have the same size)

After that:

  1. I instanced that scene into another scene with a staticBody as a floor
  2. I set the VehicleWheel nodes in the back to have use_as_traction to be true; the two front ones got use_as_steering = true
  3. On the VehicleBody I set engine_force to be 200

The problem now is that this doesn’t work. While the car has gravity and makes contact with the floor, it doesn’t drive forwards.

Even more confusing: When I manually set the engine force of the wheel in the backright to 0, then the car is moving forwards but with a drift to the right (as would be expected if only the left wheel moves) but when I set the engine force of the wheel on the backleft to 0, then the car is moving backwards with a leftward drift.

So it seems like the 2 wheels in the back are moving in the opposite direction and cancel each other out, is that correct? If someone could explain to me what I am doing wrong that would be amazing!

:bust_in_silhouette: Reply From: 1izNoob

Nevermind, sorry about that.

The problem was a number of reasons:

  1. The VehicleWheels need to point in the forward direction, not backward (I already facepalmed myself…)
  2. The scaling got messed up when setting up the car with one wheel being scaled by -1

Making sure that both backwheels have the same transform and point in the right (forward) direction was needed.