This is an odd one, that has me kind of stumped. If I execute the code:
void FixedUpdate()
{
rigidbody.AddRelativeTorque(0, 1000, 0);
}
I get this:
Normal, expected behavior. The (car in this case) rotates fine around Y. But if I try and change the center of mass,
void Start()
{
rigidbody.centerOfMass = new Vector3(0, -0.2, 0.9);
}
void FixedUpdate()
{
rigidbody.AddRelativeTorque(0, 1000, 0);
}
The car spins on all 3 axis. AddTorque has the same problem. It is as if AddRelativeTorque/AddTorque are not accounting for the moved position of the center-of-mass. This was done in an empty Scene with the car floating at 0x 0y 0z.