Q: What's bad with lowering the center of mass?Ī: Jumps, collisions, crashes or air-tricks will look weird because of the false center of mass.Īrtificially lowering the center of mass is just a workaround that works under some circumstances, but fails at others. You'll see how much the handling can change by simply adjusting the difference between the stiffness of the front and rear stabilizer bars. No need for complicated custom friction/drag models at the beginning - leave them for final tweaks if necessary. Once you have the REAL absolutely simple car (rigidbody + four wheel colliders + 2 anti-roll bars) you can then apply all other techniques to get special behaviors on your car and/or tweaking its handling, i.e for arcade-style driving.Įven with the real absolutely simple car you'll find a lot of options to tweak and play with, all of them affecting the handling and feel of the car: mass, REAL center of mass (typically moved towards the engine location), front-rear springs, front-rear dampers (must be different because the axle under the engine will support more weight), front-rear anti-roll bar stiffness. Q: What about all other solutions proposed here? (lower center of mass, angular drag, custom friction models.)Ī: The essential requirements for having a car that physically feels like real include the anti-roll bars. Actually, anti-roll bars are barely mentioned in the last chapter of the Unity's Car Tutorial ( ), where an alternate car physics model is proposed. IMHO, an AntiRoll script for WheelColliders should be at least mentioned in the documentation and tutorials as a basic requirement for physically real vehicles. computer-controlled hydraulic systems) to actively emulate the behavior of the anti-roll bars in turns. The only exceptions are a very few car models that use dynamic systems (ej. You'll be able to easily identify a rigid bar that travels from one wheel's suspension to another. Look under your car, observe the suspension behind the front wheels. Stabilizer bars are an essential part of a vehicle's suspension system in the same way as springs and dampers are. Q: I haven't heard of such bars! Are really so important?Ī: Absolutely. Why?Ī: Because real cars have STABILIZER BARS (aka anti-roll or anti-sway bars)Ĭlick to expand. Q: But real cars don't roll over so easily. 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
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |