# In Unity3D, what is the relation between inertiaTensor and inertiaTensorRotation?

In there are two properties on rigidbody that correspond to the moment of inertia tensor.

One of them is: rigidbody.inertiaTensor, which I know is the diagonal of the inertia tensor,
The other is rigidody.inertiaTensorRotation, which I don't quite understand. I have, though, created a rigidbody in such a way that I get it to be other number than Quatenion.identity, but I still don't see the connection.

Can I describe the products of inertia tensor with the rotation or ... what is the relation between them and where would I require them?

• Have you investigated this item answers.unity3d.com/questions/48836/… ? – teodron May 17 '16 at 15:50
• What I suspect is that the inertiaTensor property helps you set the inertia tensor in the local object space (i.e. the canonical one). The rotation property is a quaternion that should relate the local frame to the global, world one. I do not know how they compute this quat behind the scenes (perhaps it gets computed by the collision handler). What is puzzling is why they store it there and not in the global rotation of the body to start with. – teodron May 17 '16 at 15:58
• @teodron nice find, hadn't investigated it before! Probably wrong keywords, thanks! – joltmode May 17 '16 at 19:47

inertiaTensor is a Vector3, inertiaTensorRotation is a Quaternion. And from the docs for inertiaTensor:
Essentially, inertiaTensor is the moment of inertia (defined as a tensor) and the inertiaTensorRotation is how that tensor is rotated.
If you'd like them to be calculated automatically, you don't set them. Or you can call Rigidbody.ResetInertiaTensor which:
• So, whenever I look to use inertia tensor, I should always use it like Vector3 realTensor = rb.inertiaTensorRotation * rb.inertiaTensor;? – joltmode May 17 '16 at 19:48