Page 1 of 1

is local_inertia_tensor intentionally too much?

Posted: Mon Apr 17, 2017 5:57 am
by yanbo2u
for a standard box with L meter for every edge and m kg for mass, the inertia_tensor in x,y,z should be m*l*l / 6.

but when I check the value of box.LocalInertiaTensor matrix, the variable value seems to be 2.5 times of m*l*l/6.

Is it intentional or I misinterpret the value ?

Re: is local_inertia_tensor intentionally too much?

Posted: Tue Apr 18, 2017 5:16 pm
by Norbo
Yup- higher inertia tends to help stability by reducing some oscillation. It's a total hack, but it's usually a good choice since most people don't notice "hey that box is behaving as if its mass is actually compressed to its outer edge rather than being a uniform distribution!" :)

The hack is controlled by the InertiaHelper.InertiaTensorScale, which does indeed default to 2.5. Changing that property only affects inertias calculated after the change; it doesn't do any retroactive updates.