controlling the center of mass for a car

how would i use the rigidbody.centerOfMass to lower a cars chance of rolling over

rigidbody.centerOfMass=new Vector3(0,-1,0);

To get a feel for how to change it, helps to see what it is now. centerOfMass is an offset from the (0,0,0) point of your object. Say you have a car with (0,0,0) on the bottom, so the bounding box is all above and maybe a little more forward because of some cool fins. If you print centerOfMass, you might see something like (0, 2, 0.4);.

If you want to go off of what the computer has done; maybe move it down by 1 and 0.5 forward to account for the heavier engine; can say rigidbody.centerOfMass += new Vector3(0, -1, 0.5);

Hello every body,

I have a question concerning the location of the centre of mass. I am working with two “Rigidbody” which are joined together (with the property “Fixed joint”). I need to know the accurate location of the new center of mass. How is it possible?

Thank you very much!