- Home /
Vehicle physics and Center of Gravity
I've got a problem with the center of gravity on my car. If I make the center of gravity (0,-2, 0) to increase its stability, my car tends to drift off to the side. If I turn off the function that sets the center of gravity, it stops drifting. Is there any way I can fix this?
Thanks, Elliot Bonneville.
Answer by 3dDude · Aug 25, 2010 at 01:09 AM
you could try using a centerOfMass object as a child of the car using code like this:
var centerOfMassObject : Transform;
function Update () { rigidbody.centerOfMass = centerOfMassObject.localPosition; }
using this you can tell where the center of mass is and position it by hand...
hope this helps!
Thanks... turns out it's a bug in PhysX but I'll accept your answer anyway. ;)
Your answer
Follow this Question
Related Questions
How can i import a new car in edy's vehicle physics? 2 Answers
How do you not allow a car to flip with Edy's phyics? 0 Answers
Bouncing off Walls in C# 1 Answer
Spin wheels to move vehicle 0 Answers
Race Network Game 1 Answer