I am trying to implement basic arcade like vehicle physics (i.e. Mario Kart, Crash Team Racing, ...) but I am not able to get the suspension working right. I am not using the built-in VehicleBody as that one seems much more complex than what I need and also I would like to extend this to work for motorcycle vehicle types later.
My main inspiration is the approach described in this (
"video") (@2 min.).
That works well but the suspension never stops bouncing so from additional research I found out that there should be a "damper" component to the force calculation. Using the velocity as a countering component seems to be going in the right direction at start, but the spring never stabilizes and the force that accumulates throws of the vehicle completely ((
"video")).
The script that I am using for the raycast suspensions (and test scene) can be seen here.
Any help, hint or feedback whatsoever is highly appreciated!