Godot Version
Godot 4.2.x
Question
Is there any solution to prevent my car from overturning?
3 solutions:
Make gravity or object heavier.
or
Clamp the rotation
or
Make so if it reaches a steep angle, you apply enormous amount of velocity to pull it back down.
Hope this solves something ;D
How can i clamp the rotation ?
βvar rotation = clamp(rotation, min, max)β
Instead of min and max, put the min and max rotation you want. This should work, but note that rotation needs to be in radians, so you will have to do some calculations.