bevy_rapier icon indicating copy to clipboard operation
bevy_rapier copied to clipboard

Cannot set initial `ReadMassProperties`

Open paholg opened this issue 5 months ago • 1 comments

I would like to spawn an entity and query over its mass in the same frame. This does not seem possible today; the only constructor for ReadMassProperties is default() which sets it to 0.

I understand not wanting this to be mutable in general, but there should be some mechanism to set it initially. The simplest would be to make a new function. This could easily be messed up, since the actual properties are derived from the rapier RigidBody, but I don't think it would be any worse than today, where it's just 0.0 until the physics systems have run.

paholg avatar Mar 14 '24 11:03 paholg