You should first set the last parameter ( Stiffness Factor) to 0.01-0.03 to have more realistic tyres, but even in that case the car will roll over when stering at certain (low) speed. So the rigidbody has no choice but rolling-over when steering even at low speed. If you could build that in real life, it would do the same! PhysX is not perfect, but resembles the physical behavior of real objects in a fairly good manner.Īlso note that the default WheelCollider's friction curve parameters in Unity (1,20000,2,10000,1) define a tyre with almost infinite grip. You have added a control script, tested it, and as soon as you gain a bit of speed and do a corner, the car rolls and flips over. Maybe you've even used some real car's data (mass, dimensions.). So you have created a box, added a rigidbody and four wheel colliders. Q: Why my absolutely simple car (rigidbody + 4 wheel colliders) flips over so easily when steering?Ī: Because that's exactly how such car would behave in real life!! This is the typical stability problem when using WheelColliders:
No parameter is modified at runtime! (center of mass, rigidbody, drag or angular drag, suspension.) Default tyre friction curves, only stiffness is adjusted (forward: 0.82, sideways: 0.022) REAL center of mass, located around the front seats. Simple PhysX model: rigidbody + some box colliders roughly resembling the car's shape + 4 standard WheelColliders It's not only a typical road-car not meant to being too stable, but it also carries a heavy 500 Kg (1100 lbs) box! Can you keep it safely with you in all kind of terrains? Press N to disable all stability features (keeps the plain rigidbody + 4 wheel colliders only). Press B to change the stability mode among "Sport / Offroad" (default is "Sport") if you flip the car or fall outside the terrain)
How to make a physically real, stable car using WheelColliders