rapier icon indicating copy to clipboard operation
rapier copied to clipboard

Setting compound shape builder density to 0.0 causes div by zero and later also panic

Open DasEtwas opened this issue 3 years ago • 0 comments

By creating compound shape builder using ColliderBuilder::compoundand setting density to 0.0 results in a div by zero once the built collider is added into a ColliderSet. This can be recreated by adding a ".density(0.0)" to the compound3 example. A workaround is setting the mass_properties manually to MassProperties::zero().

In my case, the end goal was controlling the mass properties of the whole rigidbody manually by setting collider density to zero and using the rigidbody's additional mass properties to "set" them.

DasEtwas avatar Apr 16 '21 19:04 DasEtwas