w0rm/elm-physics

Improve moment of inertia calculation

w0rm opened this issue · 0 comments

w0rm commented

The current moment of inertia calculation is oversimplified, it takes the bounding box of a body and assumes the cuboid shape according to the formula from the wikipedia page.

This doesn't work for bodies that are not boxes:

  • spheres,
  • compound bodies,
  • arbitrary convex polyhedrons (when we implement them).

This may also be the reason why a compound body behaves very differently from the same parts connected with a lock constraint.