# Edy's Vehicle Physics - official thread

Discussion in 'Assets and Asset Store' started by Edy, Jan 19, 2012.

1. ### Edy

Joined:
Jun 3, 2010
Posts:
2,537
Nice! I've got most of the values for my cars in the same way. I'd really like to test your setup!

Ahh, I see. That makes sense. The deformation parameters are expressed in world units in terms of "distance to the hit point", "deformation radius", etc. So if the model is scaled you have two choices: either get it as close to 1:1 as possible, or tweak the CarDamage parameters to match the scale (deformRadius, deformNoise, deformNodeRadius, maxDeform).

2. ### Gaute-Heggen

Joined:
Mar 19, 2012
Posts:
4
Hey Edy, thanks for a great package!

I am going to have my vehicle on a ferry that is moving across a body of water in my game. Problem is all car physics seem to relate world coordinates and not the moving surface the vehicles are on. So when I hit the car's handbrake on the ferry the car actually skids backwards, and also I need to accelerate to keep up with the moving ferry. I hope the fix is as easy as setting the ferry as the vehicles parent when its needed so the cars inherit the ferrys coordinates. Do you have any ideas how to solve this issue?

Brgds, Gaute

Last edited: Feb 6, 2013
3. ### Edy

Joined:
Jun 3, 2010
Posts:
2,537
You're very welcome!
First, please check out this video. The first minute is enough, although the thumbnail says everything by itself

I wouldn't set the ferry as the vehicle's parent. I don't think that would help the physics at all. Instead, here you have some ideas:

• Ensure the surface the vehicle is on contains a rigidbody. The vehicle will then react relatively to it.
• If you are simulating the movement and buoyancy with script you must use a rigidbody with the isKinematic property enabled. Use the functions rigidbody.MovePosition and rigidbody.MoveRotation for moving the ferry instead of using Transform.
• Still, there may be some sliding over the ferry's surface (as you can appreciate in the video over the bus). You may want to detect whether the vehicle is stopped over the ferry, then disable user's control, disable vehicle's rigidbody and try those solutions like making it child of the ferry's transform until you need to return the control to the user again. I haven't experienced with these kind of solution, so I cannot tell for sure if it will work. Another possible workaround is to set the grip of the tires to a huge value while they are on the ferry (CarControl.ForwardWheelFriction.grip, CarControl.SidewaysWheelFriction.grip).

Hope this helps!

4. ### Gaute-Heggen

Joined:
Mar 19, 2012
Posts:
4
I have made at least two of the bummers you describe so I am sure it will work with your hints. Some sliding if the physics work properly is nice. There is going to be gameplay on the ferry so I might want to make it more difficult with som buoyancy. The physics in the video look great, the car on top reacts very well so I am sure this will work.

Gaute

5. ### schwertfisch

Joined:
Sep 7, 2010
Posts:
126
Hi Edy, I have just purchased your package and so far it looks amazing. Congratulations on your great work!

I'm thinking of developing a game with a camera view similar to the one "Reckless Getaway" has. The camera follows a path. It has the speed of the vehicle and smoothly follows it's left-right movement. It doesn't rotate at all. This is what I want to do.

Could you give me some guidelines on how would I go about making this camera movement? Thanks

6. ### Edy

Joined:
Jun 3, 2010
Posts:
2,537
Well, I don't see anything special or challenging on that camera movement. You just define a path, and keep the camera following that path. The CamSmoothFollow script provided with Vehicle Physics could fit perfectly by targeting a point in the path instead of the vehicle. It needs some logic to keep a speed that varies slightly according to the vehicle (which seems also to be "pushed" within the limits of the camera's view), but that's just part of the game's logic.

7. ### ddesmond

Joined:
Feb 9, 2010
Posts:
163
Hi Edy,

I have two questions, what is the ETA for the pro version and what would the price be?

8. ### AliAzin

Joined:
Jun 25, 2009
Posts:
51
Hi,

Is there any option for scaling down the whole world but the car behavior stay the same?

9. ### G0ldenbear

Joined:
Sep 26, 2012
Posts:
5
Hi Edy,

Apologies if I'm being dumb, but I've just purchased this great plugin and would like to have access to the live git repo and the also the C# code.

It looks like I should have received an email with the user and password info but I did not. I also cannot find a support email anywhere to send my proof of purchase to request this info so I'm resorting to posting here. Could you let me know what is the process is for getting access?

10. ### john-essy

Joined:
Apr 17, 2011
Posts:
464
I just purchased it also, and have sent proof of purchase.

11. ### Edy

Joined:
Jun 3, 2010
Posts:
2,537
Hi, my apologizes. I've been very busy these last two days and I've been unable to find time to answer the emails. I'll catch up with them within next hours.

(That's why I tell "please allow 24-48 hours to the reply to arrive" )

12. ### kaiber

Joined:
Mar 4, 2013
Posts:
15
This is by far the best asset I've bought, you've done an excellent job!

One question, is there any way to mantain the handling of a vehicle if I scale it up? If I just increase the scale of the parent object, the handling becomes much less sensative

13. ### WPCJack

Joined:
Mar 15, 2013
Posts:
26
Hey Edy great tool,

Still getting the hang of it. I've got a couple of questions, I've increased the gravity and the springs respectively but the car still ends up driving completely differently, should I just be tweaking the car with the additional gravity or are there other variables to multiply.

We're looking to make something more arcady and as part of that we'd like the car to drifts sideways a lot. None of the presets are very drifty and I was hoping you could give me some pointers in the right direction, particularly with regards to brake settings.

Cheers

14. ### trooper

Joined:
Aug 21, 2009
Posts:
748
Hi Edy,

Is there any way to stop the vehicle from spinning out when it lands?

I find that if I land on a slope that is not perfectly slanted upward or downward it will cause the wheels to start spinning and eventually spin the car out.

Have you experienced this?

I'm using stock Sport Coupe settings from your demo at the moment.

EDIT:

I can limit the behaviour (but cause other issues) by stopping WheelFrictionCurve sF = m_wheel.sidewaysFriction; being updated in CarWheel.

So.. I'm guessing the magic numbers are what I need to play with...

Last edited: Mar 22, 2013
15. ### Alien3D

Joined:
Jun 22, 2012
Posts:
8
Tengo dos preguntas:
1) ¿Dónde encontrar el velocímetro y el tacómetro? (¿Cuál es la secuencia de comandos para tener en cuenta?)
2) Yo no tengo una contraseña para descargar la versión de C #, pero compré este Activo!
* No funciona! ------------------ >>>>>>>> http://projects.edy.es/webdav/edy_vehicle-physics/ <<<<< -------------------------- <<<<<< Donde contraseña?

16. ### eddyjohnson3

Joined:
Jul 27, 2012
Posts:
49
Hi, I am another happy edys vehicle physics user, thanks for the great tool. But there is one thing I cant figure out rearding the smoke system:

Is there a way I can define on what surface do I get the skidmarks/smoke? For instance if I want only smoke on a dirt road and only skidmarks on a different surface, can I do that within the same scene? Sorry if I missed this information in documentation somewhere but I could not find it.

17. ### Edy

Joined:
Jun 3, 2010
Posts:
2,537
Thank you!
Changing the scale of the vehicle is the same as if you scale a vehicle in the real life. It won't behave the same way, and you must configure it for the handling you want.
It's advised to use 1:1 vehicles and international units (mass in kg, etc) because the physics works coherent with them, especially with regards to WheelColliders (spring and damper rates, tire friction).

Note that the the demo scene also features scaled vehicles (all pickup trucks), but their settings have been configured after applying the scale.

Thanks!
As replied to the previous question, changing scale, gravity, etc. likely means that you have a different vehicle. Changing gravity is equivalent to increasing the mass of the vehicle in the "down" direction, but not with respect to logitudinal-lateral inertias and momentums. Some effects of having more downforce:

- More tire friction. You should play with the CarControl parameters described at Performance behavior parameters.
- More weight supported by the suspension. You should increase WheelCollider's suspension spring, and maybe adjust suspension damper and distance.

As with changes in real vehicles, these modifications will surely require to adjust settings in other parameters in order to get a balanced handling and behavior. I've written some indication in the FAQ at the top of this thread.

18. ### Edy

Joined:
Jun 3, 2010
Posts:
2,537
That depends on the target behavior you want. As you can experience in the Demo scene, the Sport Coupe offers a nice balance between good control and going out of control when one pushes it really hard. In your specific case, you might try adjusting the CarControl's parameters sidewaysDriftFriction, frontSidewaysGrip and rearSidewaysGrip. Also (or instead), adjusting the longitudinal position of the center of mass will have a significant impact.

Definitively playing with the magic numbers it's NOT a good idea. You can configure everything with the parameters at CarControl. The effect of the magic numbers is correcting the (in)famous design of the WheelCollider, which by default is unusable for decent vehicle physics.

How to make skidmarks and smoke work with my meshes?

The CarVisuals script contains two functions, IsStaticSurface and IsHardSurface, which define the conditions that must meet each kind of surface with respect to skidmarks, smoke and sound:

- IsStaticSurface means the surface doesn't move, so it's suitable for drawing permanent marks (skidmarks on asphalt, and also think on tire marks on mud for future versions).
- IsHardSurface means a solid surface so the tire can make skid sounds and generate smoke. Examples of hard surfaces are asphalt and other car's bodies. Non-hard surfaces are the offroad surfaces, so the wheel generates "offroad" sound and no smoke.

Feel free to edit these two functions for matching the conditions of your scene. You could use tags, for example.

19. ### SteveB

Joined:
Jan 17, 2009
Posts:
1,451
I posted these same questions in the UnityCar Pro thread (for anyone who noticed ) and I wanted to compare these two physics packages, so I hope you don't mind my asking about Edy's Physics:

• Is there any metric for performance on mobile? (expectations)
• Is there an optimized mobile example scene in the package?
• Alternatively is it as simple as 'toggling' a mobile switch to easily create a mobile optimized scene?(excluding optimized assets)
• Has anyone used other competing vehicle packages and if so comparisons to quality/performance?

Again my biggest priority is performance with a single vehicle, and the way the physics 'feel' at the mobile level.

Thanks guys!

-Steve

20. ### Edy

Joined:
Jun 3, 2010
Posts:
2,537
As example/reference I can tell that Duty Driver work flawlessly at full FPS rate in my old Samsung Galaxy S GT-i9000.

The included demo scene is mobile-ready by removing the image effects from the main camera.

Exactly. If you're using the demo scene as base, remember to remove/disable the image effects and include the mobile on-screen controls.

Everyone's invited!

Personally I've tested UnityCar and I felt it way too complex to understand/configure. Too many scripts and parameters without a kind of solid base. The behavior of the demo vehicles feel too "constrained", too unnatural (you name it). I'm sure that one could configure great vehicles with it other than the built-in, but it would took way more time that I'd be willing to invest at.

My package condenses the few parameters that configure a vehicle's handling into a single script, CarControl. You can achieve almost any handling and behavior by configuring the parameters in this script. Learning to configure vehicles requires you to experiment with this script only. If you want to run the extra mile you can learn about the stabilizer bars and add further features with the other scripts (damage, abs-tc-esp..., visual effects ...)

I believe that Duty Driver is the perfect example. You can download a free version from the Play Store.

21. ### SteveB

Joined:
Jan 17, 2009
Posts:
1,451
Great thank you Edy! I neglected to mention simplicity as I don't need real-world vehicles rather, just need them to feel fun, so yea one script to rule them all sounds ideal.

Would love to get Duty Driver but alas I'm iOS here; I'm going to extrapolate then that on iDevices it's fine as well.

This is helping narrow things a bit for me!

Thanks bud

-Steve

22. ### MatthewSam

Joined:
Apr 9, 2013
Posts:
2
Hi Edy

I have just imported your project and added one of the vehicles from vehicle/prefab into my scene and added the main camera to it from the prefab folder and assigned the mirrors but for some reason I am getting errors:

NullReferenceException: Object reference not set to an instance of an object
CarVisuals.Start () (at Assets/EdyVehiclePhysics/CarVisuals.js:81)

NullReferenceException: Object reference not set to an instance of an object
CameraControl.UpdateTarget () (at Assets/EdyVehiclePhysics/CameraControl.js: 88)
CameraControl.Start () (at Assets/EdyVehiclePhysics/CameraControl.js:252)

NullReferenceException: Object reference not set to an instance of an object
CameraControl.Start () (at Assets/EdyVehiclePhysics/CameraControl.js:262)

not sure if i'm doing the correct steps as I followed your steps on the tutorial of how to add vehicles to your scene. Could you please guide me on how to use go about using the vehicle in the scene to get rid of the errors. Your help would be much appreciated.

Thanks

Last edited: Apr 9, 2013
23. ### Edy

Joined:
Jun 3, 2010
Posts:
2,537
Based on my experience with both packages, I think that mine is most suitable for "fun vehicles that feel like real" (GTA style) or just "fun vehicles" (Trackmania style). The parameters in the control script have a well defined and predictable behavior, so once you learn how each one affects the final handling, you will be able to fine tune them to get the exact behavior you want for the vehicle.

For a complete vehicle implementation I'd recommend the other packages, or even the Alternate Physics Model you can find in the Unity's official Car Tutorial (UnityCar is based on this model).

Here's a game for iOS that uses Edy's Vehicle Physics:
http://www.edy.es/dev/2012/07/a-success-history-on-iphone/

24. ### Edy

Joined:
Jun 3, 2010
Posts:
2,537
Hi Matthew,

I've just followed the tutorials and everything worked fine. The only issue I've found is that the Cars array in the Main prefab initially contains empty references to vehicles, which is incorrect. The Cars array should only contain valid references, so the empty slots must be removed:

I'd recommend you to try following the tutorials with basic / empty scenes first, then extrapolate the results to your own scenes.

25. ### Mantra-Games

Joined:
Nov 27, 2012
Posts:
174
Hey Ed,

I'm getting some errors when I import your asset into my existing project. Starting a new project is fine..but I definetly need to get it working within my existing project. Suggestions? Thanks.

26. ### MatthewSam

Joined:
Apr 9, 2013
Posts:
2
When I import it into a new project it works fine or even a new scene but the problem occurs when I drag the prefab to my scene although all I have is my scene set up with no camera. Yes I had an empty array to but followed the main reference page and it said to select the car which I did so my main looks like this:

I followed all the reference pages to see what to modify and still got those errors in my scene.

27. ### Kamax

Joined:
Apr 9, 2013
Posts:
3
On Pc/Mac build it run ok for me but when i switch to Android build i have a lot of errors.
Most of them are "unknow identifier 'i' ", "cannot be used with a left hand side of type 'Object' "

How can i fix this ?

28. ### Edy

Joined:
Jun 3, 2010
Posts:
2,537
You are using an old version of the package. Prefabs in that version strongly depend on other objects and scripts. Please upgrade to the latest version available at the Asset Store. Version 4.3+ contains standalone drag play prefabs which work seamlessly as described in the tutorial (Adding vehicles to your own scenes).

Last edited: Apr 12, 2013
29. ### Edy

Joined:
Jun 3, 2010
Posts:
2,537
Update to the latest version. Those errors have been fixed long ago. There are also some recent minor fixes at the GIT repository.

30. ### Edy

Joined:
Jun 3, 2010
Posts:
2,537
Ohh, that ancient problem. For some reason beyond my understanding Unity keeps confusing my own camera scripts with those from the Standard Assets. So as you already have the Standard Assets in your scene, Unity won't even show mine in the Import dialog. Weird.

Create an empty proyect, import Vehicle Physics there. Open your project, and move the missing scripts from the other project to yours. You can keep two Unity instances opened with different projects (hold Alt or Cmd while clicking the Unity icon).

31. ### Vinayak

Joined:
Apr 12, 2013
Posts:
1
Hi Edy,
Thank you for your great product, I really appreciate it.

Thank you

Last edited: Apr 12, 2013
32. ### Edy

Joined:
Jun 3, 2010
Posts:
2,537
Sorry for the delay, maybe it took me 49 hours this time to send the GIT data . I guess I should reduce the number of simultaneous projects I'm working on

33. ### TheRealFuzz

Joined:
Jul 17, 2012
Posts:
308
Hey this looks really cool but I'd like to ask a few questions before I buy it. How well do the cars work on uneven terrain and does it work with Unity free v4?

34. ### Edy

Joined:
Jun 3, 2010
Posts:
2,537
Try the Live Demo. You have an offroad track near the starting point with many different terrain types to try. Note that the grip in this terrain is reduced.

35. ### TheRealFuzz

Joined:
Jul 17, 2012
Posts:
308
Thanks Edy, it works really nice! Do you know if your system is compatible with Ultimate FPS Camera and UniStorm? I really want to buy this

36. ### Edy

Joined:
Jun 3, 2010
Posts:
2,537
You're welcome! I haven't tried those packages, but I can't see any reason for them not to work with Vehicle Physics.

37. ### TheRealFuzz

Joined:
Jul 17, 2012
Posts:
308
Awesome! Sorry for all the questions but I have one more, this will work fine over a network with multiple players driving cars, correct?

38. ### Nazarael

Joined:
Oct 3, 2012
Posts:
5
Can this plugin be easily configured for crazy arcade racing physics in the lines of Mario Kart? From the looks of the demo I can see this is more driven towards real simulation car physics.

I've already made a mistake of purchasing a similar package hoping I could easily tweak it for such purpose but it turned out the process was actually longer than rolling out my own. :neutral:

39. ### erp.lsf

Joined:
Apr 13, 2013
Posts:
7
I have problems trying to import custom cars - I copied structure of predefined cars, replaced them with right links, but my car starts to flow in the air, as soon as I gain some speed. Looking at the scene, I noticed thet WheelColliders stay like frozen on the earth and probably creating so much force that car is pushed up. What may be causing the problem?

Last edited: Apr 17, 2013
40. ### Edy

Joined:
Jun 3, 2010
Posts:
2,537
It would require the same work as any other kind of multiplayer game. In Edy's Vehicle Physics each vehicle can be controlled independently of others via scripting or any other method. As example, you can activate "AI" button in most vehicles in the live demo. It's not true AI, but a script providing random behavior to the vehicles. You can take it as example for configuring your own control methods.

Note that most arcade racing games don't require a vehicle physics package at all. I don't hesitate to recommend people to try implementing their own arcade vehicle rules instead of trying to adapt a vehicle physics package to arcade behavior (despite the "Arcade" checkbox some packages include claiming to solve all your arcade needs).

I'd recommend you to try creating a vehicle using just WheelColliders and a rigidbody. Configure the WheelColliders not to have any kind of friction (set all friction curve's "stiffness" values to 0). Then experiment by adding forces to the rigidbody depending on the user's input and the actual velocity and orientation of the rigidbody. You should be able to easily create arcade rules that are easily configurable for the specific gameplay you are targeting.

Also, you may find the special modes for the AddForce function very useful.

Check out this video. I don't understand a word in russian, but I've found the video pretty self-explanatory. It shows all the steps required for adapting your vehicle to Edy's Vehicle Physics. The part one (linked in the description) shows how to prepare the 3D model in 3DS MAX.

41. ### Nazarael

Joined:
Oct 3, 2012
Posts:
5
Thank you for the honest tip, your response is greatly appreciated.

I take it that the wheel collider method provides better performance than a raycasting method then? I need all the performance boost I can get since the target platform is mobile.

42. ### aglavarar

Joined:
Apr 23, 2013
Posts:
14
hi mr edy

introduction
my name is angga..
i'm from indonesia..
now, i', student collage

i have seen your package , edy's vehicle physics..its very cool..

its ok,, i have issues,

i want make research about implementation physics rollover car in car simulator for my thesis..
my question, whether edy's physics vehicle become example implementation physics rollover ?

thanks
#angga

please pm me, i cant pm you

43. ### newlife

Joined:
Jan 20, 2010
Posts:
1,081
This is a real world performance comparison between UnityCar and Edy's Vehicle Physic:

Thats fun, cause actually Unitycar and Edy's Vehicle Physic have almost the same amount of parameters (try to count them), even if UnityCar has much much more features (for example accurate and realistic tire model based on Pacejka formula, accurate and realistic engine simulation (torque, power, braking friction, inertia), accurate and realistic clutch and driveline simulation).
More, 100% of UnityCar code is based on real world physic so, if you have a normal understanding of real car behavior, you will have no problem in understanding all UnityCar parameters and setting up any kind of vehicle in a short time.
For what concern the "solid base" and "constrained" behaviour, im sorry but i dont think you even know what you are talking about.
UnityCar code is based on industry standards for all aspects of the vehicle (Pacejka for tire model, torque look up table for the engine etc.). More, UnityCar has received compliments from the top names of vehicle simulation world (just for example from the author of Assetto Corsa, Stefano Casillo) and has been compared to rFactor and Carx (which are the best vehicle simulators in the market, together with LFS).

Your CarControl script "condenses" what in UnityCar is logically divided in more than one script, in order to make things clearer and more flexible (wheels parameters in Axles script, Input parameters in CarController script, Driving aids in CarController script, Performance behavior parameters in in CarDynamics and Axles script).

44. ### newlife

Joined:
Jan 20, 2010
Posts:
1,081
lol i could say the same, but it shouldn't sound so believable dont you think?

UnityCar is based on my own code and nothing else.

45. ### newlife

Joined:
Jan 20, 2010
Posts:
1,081
Since its clear that here you are referring to UnityCar, can you please tell me where did you read the claim that UnityCar arcade mode can solve all arcade needs?
Arcade mode can be tested and even fine tuned directly online, so if you dont like it, you just dont buy the package, that's simply.

46. ### Edy

Joined:
Jun 3, 2010
Posts:
2,537
A WheelCollider is a raycast itself plus suspension and tire force simulation. If you switch off the tire friction then you get the suspension, and you have freedom to apply the forces to the rigidbody in the way you want. Using raycast only you'd have to simulate the suspension yourself. Since the WheelCollider's suspension is built-in in the PhysX code, then it's already optimized and fully consistent with all the physic behavior.

Edy's Vehicle Physics uses an additional raycast per wheel for visually positioning the wheel's mesh. Note that this extra raycast is optional and can be omitted without affecting the physic behavior. This results in a huge optimization if you need to get the maximum performance. The wheel's mesh can then be positioned using the actual contact point as reported by the WheelCollider. It's not so accurate visually but hard to notice in most situations.

EDIT: Forgot to mention that the CarVisuals component includes two options for optimization: Disable Raycasts and Disable Wheel Visuals. First one can be enabled by default, and optimizes the situation described above. The second one is suitable for the vehicles that are not visible to the camera or near the player (as it affects skidmarks and tire sound as well).

Hi Angga, thank you very much!

Edy's Vehicle Physics uses the Unity's built-in physic simulation package, PhysX by nVidia. All that I do is to control the forces at the points where the wheels touch the ground. I'm not sure if this is as accurate as you need for your thesis, but as long as the vehicle is properly modeled (center of mass, wheel's positions, collider's shape) they you may create a fairly good approximation.

About rollover, you may find interesting my article about the anti-roll bars:
http://www.edy.es/dev/2011/10/the-stabilizer-bars-creating-physically-realistic-stable-vehicles/

I wrote the article as response to the most common situation one may find when simulating vehicles with Unity 3D: the vehicle rolls over when steering. You may find some useful information there.

Last edited: May 2, 2013
47. ### ChristopherC

Joined:
Apr 29, 2013
Posts:
4
I try your demo, and it just really cool.
No car/race project for the moment, but i know where to find it .

48. ### Bty

Joined:
Mar 14, 2013
Posts:
7
I just bought this packet and playing around.

One question, I'm trying to make the car drift, but at the moment the car is losing a lot of speed every time I steer. Is there a way to keep the speed in the car when you steer?

49. ### aglavarar

Joined:
Apr 23, 2013
Posts:
14
thank you for your article..very help me..
in real world..every car have critical velocity when car turn or curve..so critical velocity is indication car will rollover..in your demo i drive a bus, why bus not rollover when bus turn with high velocity??

50. ### Edy

Joined:
Jun 3, 2010
Posts:
2,537
As for the nature of the vehicle dynamics, drifting means that your wheels are facing the direction of the movement with their side. This necessarily means a heavy friction and a reduction of the speed. The trick is to increase the forward force at the wheels when throttle is applied, so the vehicle "converts" its linear velocity (now reduced by the sideways friction at the wheels) into lateral velocity. The overall velocity is more or less conserved while the vehicle moves in a curve path. At the same time, applying the correct throttle at the drive wheels makes them loose sideways grip, reducing the lateral friction. The balance among the longitudinal force and the sideways drift reduction allows the vehicle to keep this behavior for relatively long periods of time. This is actually drifting.

Information for configuring and balancing the parameters for drifting can be found at the FAQ in the first post of this thread.

Not every car have a critical speed and then will rollover. This also depends on the tire they wear, the suspension, the location of the center of mass... For example, many road cars wear slim tires useful for city driving. These tires offer small grip. No matter the speed they are traveling or steering, these cars will slide laterally instead of roll over (we assume a flat road with no bumps).

On the other side, the popular truck ("all terrain") vehicles, have a high center of mass and tires that can deliver a strong grip. Some of them can roll-over easily and are popular for being unsafe under certain conditions.

BTW, I've been made the bus roll over under extreme conditions (turning high-speed in a cross roads while making the inner wheel to hit the kerbs).