VehicleBody

    Physics body that simulates the behavior of a car.

    This node implements all the physics logic needed to simulate a car. It is based on the raycast vehicle system commonly found in physics engines. You will need to add a for the main body of your vehicle and add VehicleWheel nodes for the wheels. You should also add a to this node for the 3D model of your car but this model should not include meshes for the wheels. You should control the vehicle by using the brake, , and steering properties and not change the position or orientation of this node directly.

    Note: This class has known issues and isn’t designed to provide realistic 3D vehicle physics. If you want advanced vehicle physics, you will probably have to write your own physics integration using another class.

    Slows down the vehicle by applying a braking force. The vehicle is only slowed down if the wheels are in contact with a surface. The force you need to apply to adequately slow down your vehicle depends on the of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 30 range for hard braking.


    Note: The simulation does not take the effect of gears into account, you will need to add logic for this if you wish to simulate gears.

    A negative value will result in the vehicle reversing.


    • steering