- 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

Follow this Question
Related Questions
Compute the torque needed to rotate an object at a constant rate 3 Answers
inertiaTensor stopping automatic rotation 1 Answer
How do I programmatically Combine Inertia Tensors? 2 Answers
How to calculate inertia tensor and tensor rotation manually 2 Answers
How can I detect Actors which will cause the "Compute mesh inertia tensor failed!" error? 1 Answer