rapier
rapier copied to clipboard
Setting compound shape builder density to 0.0 causes div by zero and later also panic
By creating compound shape builder using ColliderBuilder::compound
and 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.