Inertia tensor?

I need to get the inertia tensor.

There is a function called get inertia tensor:

However as you can see, it returns a 3-vector.

The inertia tensor, however, is not a vector…it’s a 3x3 matrix, as explained here (and any other math website):
http://www.kwon3d.com/theory/moi/iten.html

What, then, is UE4 actually returning…and is there any way to actually get the full inertia tensor?

The full tensor is required in order to calculate the torque necessary to result in a given angular velocity.

I have answered my own question.

It looks like this is just a pass-through to a PhysX function:

virtual PxVec3 PxRigidBody::getMassSpaceInertiaTensor() const
http://docs.nvidia.com/gameworks/content/gameworkslibrary/physx/apireference/files/classPxRigidBody.html#a063cce94190de44d86a15c1b49dd7f71

According to the PhysX doc, it “Retrieves the ***diagonal *** [of the] inertia tensor of the actor relative to the mass coordinate frame.”

Apparently, PhysX always assumes that inertia tensors are diagonal.

The main limitation is that this means your objects must be axis-aligned, and any geometry that is off-axis will lead to unrealistic angular velocities in the simulation.

2 Likes