Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(+1)

In the most basic movements, the car accelerate and brake at different rates. In the game the brake force is stronger.

The pivot point is at the front wheels, and the  rotation force vary with the  speed. I used a second degree polynomial curve :

(-(1/max_speed)*current_speed^2+current_speed)/(max_speed/4)

The resulting curve will be a float between 0 and 1. This value is a coefficient that will be multiplied with the real rotation speed. That mean the max rotation speed available is  when we are in the middle point between the max speed and 0.

But there is a twist: on the second half of the curve I add a "high speed rotation" value to the coefficient (0.3 is an acceptable value). The value is then capped at one.

The final curve is a standard growing curve until the middle point, where it keep at its maximum value for a while and then drop slowly to stop at the high speed rotation value.

I hope this explanation will help you with your 3D car physics :)

If you have any questions or if I didn't explain well some things don't hesitate to ask !

(+1)

Thanks for the curve, that’s might help me to hack the steering. Will try to plot it this night to better understand it.

Ah yes, do you use RigidBody2D node? If yes, do you kill the lateral velocity too?

(1 edit) (+1)

I used a KinematicBody2D for the car, and yes, I zero out the lateral velocity because when there is a collision the car is bumped away like a soap bar. Very funny though, a little less for the final user experience.