- Home /
Center of mass alternative?
Hello! I ask you a question.
How can I prevent my vehicle from tipping when turning WITHOUT using the center of mass?
Because the "rigidbody.center of mass" affects the vehicle suspension and turns very unrealistically, it does not tip over but it is not realistic.
I want to get something like this: (See how the vehicle turns at minute 7:31 of this video): https://www.youtube.com/watch?v=0BjhWXmnHRM
Thank you!
Answer by Namey5 · Apr 25, 2020 at 06:48 AM
https://www.edy.es/dev/2011/10/the-stabilizer-bars-creating-physically-realistic-stable-vehicles/
This is a classic article that explains this whole thing quite well. It is written in .js (back when Unity used to support it), but the logic isn't too difficult to translate to C#. The basic idea is to apply a stabilising force upwards based on the compression ratio between the suspension on both sides of the axle. From there it's just a matter of finding the right amount of force to apply to get stable turning, but still allow some compression.
Your answer
Follow this Question
Related Questions
How to make traction control for car? 1 Answer
Shift gear with own RPM? Help please! 0 Answers
Better RPM?? 0 Answers
transmission clutch help! 1 Answer
How to create car suspension system? 1 Answer