Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot set initial ReadMassProperties #484

Open
paholg opened this issue Mar 14, 2024 · 1 comment
Open

Cannot set initial ReadMassProperties #484

paholg opened this issue Mar 14, 2024 · 1 comment
Labels
A-Integration very bevy specific D-Easy P-Low question Further information is requested S-not-started Work has not started

Comments

@paholg
Copy link
Sponsor

paholg commented Mar 14, 2024

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.

@Vrixyz
Copy link
Contributor

Vrixyz commented May 22, 2024

I think you want AdditionalMassProperties ; more info here: https://www.rapier.rs/docs/user_guides/bevy_plugin/rigid_bodies#mass-properties

@Vrixyz Vrixyz added question Further information is requested D-Easy P-Low S-not-started Work has not started A-Integration very bevy specific labels May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Integration very bevy specific D-Easy P-Low question Further information is requested S-not-started Work has not started
Projects
None yet
Development

No branches or pull requests

2 participants