VehicleBody physics.

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

Im trying to use the vehiclebody node for making a physics based car game. Is this the best idea or should i try something else?
Im trying to add physics for the car to drive over a ramp. works fine sometimes but it usually ends up landing upside down or slightly sideways. Is there a way to keep it landing on its wheels in a certain direction. I tried adding the turning feature but it does not work

:bust_in_silhouette: Reply From: Bubu

You can use integrate_forces() to manually handle the rotation of the vehicle. I tried locking the rotation of the vehicle but it doesn’t look natural. If you’re just trying to prevent the vehicle from rolling over try setting vehicle_wheel’s roll_influence() to a low value.

Thanks I have roll influence but I will look into the integrate forces. I managed to get something working by using invisibile walls

Ender | 2021-04-21 23:24

Just let me know if you face any problems.

Bubu | 2021-04-21 23:25

Thanks! help me a lot!

BR.

trajesdenovio | 2021-07-13 01:21