Raycast car suspension

Hello! I have been trying to create a suspension system as the first step to making a realistic car for the past couple of days and have been unsuccessful.

The main problems ive been running into is the car just bouncing around randomly regardless of the damping value (using ApplyImpulseAtPosition) and the car either not floating up or just getting flinged (using VectorForce).

I have watched several tutorials on this, read several devforum posts and have even tried watching unity tutorials as to how Im supposed to do this. I have also been helped along the way by my friend, Fw_Yuki. I have considered using spring constraints but I have heard they can cause framerate issues when you have multiple cars with that, plus, raycast suspension just sounds better.

I was wondering if anyone could help me with the math and methods (I already have a bit of experience with what you’re supposed to do when writing a raycast suspension system from the trial and error, I just cant really get it working properly). I’m thinking if i manage to get a good product I could release an open sourced module for this.

1 Like