Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
DasEtwas opened this issue Oct 10, 2020 · 0 comments · May be fixed by #282
Open

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

DasEtwas opened this issue Oct 10, 2020 · 0 comments · May be fixed by #282

Comments

@DasEtwas
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant