nphysics
nphysics copied to clipboard
Wrong inertia calculation in `<RigidBody<N> as BodyPart<N>>::add_local_inertia_and_com`
As the Parallel axis theorem shows, one cannot just add inertia tensors of two "objects" whose CoM isn't overlapping.
The method <RigidBody<N> as BodyPart<N>>::add_local_inertia_and_com
just adds the given inertia to the local inertia.
// Update local inertia.
self.local_inertia += inertia;
found in: https://github.com/dimforge/nphysics/blob/master/src/object/rigid_body.rs#L747-L766