nphysics icon indicating copy to clipboard operation
nphysics copied to clipboard

Wrong inertia calculation in `<RigidBody<N> as BodyPart<N>>::add_local_inertia_and_com`

Open DasEtwas opened this issue 3 years ago • 0 comments

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

DasEtwas avatar Oct 10 '20 16:10 DasEtwas