Hovercar sinking into ground at high speed

I have a hovercar that uses raycasts from each of its’ corners to hover a fixed height above the ground, however, there is a huge problem that happens when it reaches a high enough speed and tries to climb up a ramp that has too much angle: the hovercar will lower/sink to the ground. I have tried several implementations of the hovering forces, but the problem still remains.


I have been searching for a solution to this problem for about a week now but I have found zero useful information. If anyone has any idea how to solve it, please let me know as I have legitimately been losing sleep over this.

Maybe use CircleCollider2D or SphereCollider on the corners instead (virtual wheels). That way you can set a radius and the physics engine will solve any overlap keeping you a set distance away from that surface.

1 Like

Hey @randallthymes ,
Can you post the code you’re using to calculate the force from the raycast? I have a suspicion you’re doing the damping wrong :slight_smile:

It looks like the behaviour you mention is expected.
Can’t you just clamp the rigidbody position from the raycast?

Have in consideration that you don’t have to apply Physics in all axis. You could manipulate the Transform vertically with out involving physics and use physics for every thing else.