This project is read-only.
1
Vote

public void CollisionSkin.GetMassProperties() is incorrect [DELETE THIS]

description

[UPDATE] The calculation is in fact incorrect although apparently this is the expected behaviour from a physics library as an accurate solution is too complex.
 
This method will only work correctly if there are no overlapping primitives used in the CollisionSkin (which is extremely unlikely when multiple primitives are used). The original author does look like they have tried to account for it however the implementation is incorrect. It results in places that have overlapping primitives having a greater density and places that don't overlap having less density than they should, this completely breaks the inertia tensor calculation.
 
The correct solution is actually really complex as you would need to break up the primitives into non-standard shapes where they overlap. This would be extremely complex to do accurately but a good approximation would probably be to build a mesh for each disjoint section of the skin, convert the meshes to polyhedra and then calculate their inertia tensors and sum them together... Still not particularly nice.

comments