Hi there, ![]()
when using the Unity Wheel Colliders, the suspension movement is basically limited to the local Y-axis of each wheel, like a rigid axle - but broken in the middle. There is no camber, caster, [insert a lot of technical terms here]… When used for a usual, common car this is not really a problem - the car body covers the wheels, the movement of each wheel (suspension travel) is indeed limited and more or less stiff.
But for a buggy-like vehicle (or other open wheel race cars) this is a not a nice solution. A double wishbone suspension (mostly used here) affects each wheel separately. Suspension distance, body roll, jumps… without a common car body covering the wheels, you can see an open chassis - and how it’s linked together, moving and twisting.
.
Depending on the given geometry of each axle and the local Y-position of each wheel, my first approach was a script which calculates a mathematical approximation in realtime, but (including Mathf.Lerp-s etc.) this was too slow and and could be unstable. jitter jitter …No, please.
Now, I came up with a solution and it works great, stable and efficient.
After modifying my first approach into a kind of setup-mode/scene, this little tool is now able to pre-calculate any double wishbone geometry and store it inside only two AnimationCurves (per axle). Evaluating AnimationCurves is easy, and it’s fast. This + just a few lines of codes is then needed for final implementation.
Each wishbone / link you can see (bright red) has a fixed length. On pre-calculation these values were shown and later the links were modeled with these given, exact measurements. There is no further tweaking, no ‘hacks’ ![]()
Please try my demo, share your thoughts and wishes!
Thank you!
I am planning to release this as an Unity Asset. Around 30 USD.
- My solution is not limited to be used with WheelColliders. It is dependent solely on the wheel’s local Y-position.
- please keep in mind, this is work in progress. More features will be added. (example: visible, moving springs / shock absorbers)
Please feel free to tell me, if you would be interested in such an asset.
If there is a reasonable interest, this would be available in about 2-3 weeks