is local_inertia_tensor intentionally too much?

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
yanbo2u
Posts: 21
Joined: Sun Oct 04, 2015 4:41 pm

is local_inertia_tensor intentionally too much?

Post 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 ?
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: is local_inertia_tensor intentionally too much?

Post 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.
Post Reply