How to calculate the rotational impulse that would be required to get a given rotation on any linkset of all prim-shapes that would be achieved in some time without friction (in sl due to being jumping/free falling)?
I think I have to calculate the "average distance of mass from every prims center of mass" along 3 axes for every prim and then calculate the linkset-average out of that for the whole linkset.
If so, then how to?
I have a problem with getting http://en.wikipedia.org/wiki/Moment_of_inertia right.
When applying an impulse, multiplyed by the objects mass (!) , a (rigid body) hollow prim rotates less the more hollow it is and a prism rotates less than a cylinder due to different http://en.wikipedia.org/wiki/List_of_moments_of_inertia .
Im not even talking about path cut, twist or dimple here.
I have a prim and use llApplyImpulse and llApplyRotationalImpulse for movement.
Prims move by applying an impulse that goes up a little, and then apply a rotational impulse.
(For "walking pets" that move along the ground or on prims this is more efficient, more flexible, more realistic and less processing intensive, than using vehicles, even in havok 4.
(The accuracy of vehicle-damping and linear/angular-deflection is usually not worth its processing in this case. Only for swimming/floating/flying damping vehicle code may be better.))
But if they collide with a wall they have to move back and rotate just the right ammount to avoid the wall, this is hard to tweak for ANY kind of mass distribution while it easily simulates a drunk peasant.
And if they tip over they have to apply the right rotational impulse to get back upright, this is also hard to tweak, it usually rotates too much along its "thin" axis (where mass is close to the center of mass along that axis) and not enough along its "long axis" (where mass is further away from the center of mass along that axis).
