bevy_xpbd icon indicating copy to clipboard operation
bevy_xpbd copied to clipboard

Real-world units not specified

Open Pyxrs opened this issue 1 year ago • 3 comments

When working with real-world values, I am not sure which scale factors need to be applied to properly recreate them in my Bevy project. Some documentation on units for properties like mass and velocity would be nice, like Bevy provides for lights and cameras.

Pyxrs avatar Nov 21 '24 08:11 Pyxrs

I second this question! I'm wondering what the units for ExternalTorque are, but haven't been able to find anything documented.

andrewexton373 avatar Jan 08 '25 00:01 andrewexton373

i'm pretty sure mass is defined as relative in this engine (thus so are forces), deltas (eg velocity) are x-per-second, and the only reason 1.0 is a meter is because the default gravity is -9.81y in my current prototype, mass is in kilograms, so 1 density (the default) is extremely light (1kgm¯³) if i multiply all the densities by, say, ten, nothing changes unless i have some set force in my code that i didn't also multiply

edit: should still be documented, just a "all mass is relative" in a few places and a clarification that torques are (mass)*rad/sec

gigamicro avatar Feb 25 '25 22:02 gigamicro

I was recently running into a similar issue and would like some clarification, since I'm not totally sure I understand. I had thought for a while that the match of 1m per unit would have an effect on forces like friction etc. Is that not the case?

For example, take a 2D scene. Bevy interprets 2D as 1px a unit by default, so physics by default in 2D feels like the objects are huge. If I simply adjust the gravity, is that all that is needed to change the perceived "scale" of my simulation? Or does it make mass/friction/etc. behave inaccurately?

piedoom avatar Jun 13 '25 00:06 piedoom