- Home /

# Get inertiaTensor of point masses

How do you get the inertialTensor and inertialRotation for a bunch of point masses in unity. The point masses are rigid bodies connected by fixed joints. The entire object rotates.

I had a physicist friend help me figure out the basic formula. He said to take the angularVelocity vector for the main object and the vector from the center of mass of the main object to each point mass. Then find the sin projection of the point mass vector onto the angularVelocity vector which will give me a vector R. The magnitude of R will be r in the formula

iterate through all point masses and add them together Inertia += .5* point mass*r^2;

But this gives me a scalar and unity wants a Vector3 for the inertiaTensor so I'm confused because he says now the problem is non-trivial and would require computing the projections on all axis and we don't know if unity already does those calculations. The reason I want the inertiaTensor and inertialRotation is to use the answer here to rotate an object with physics.

### Your answer

### Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.