Closed mikemainguy closed 1 year ago
Had a look at this. The documentation describes gravity config on both the physics system level and a per-object level.
Unfortunately it doesn't really work, as the object schema sets a default per-object gravity at "0 -9.8 0".
So even if you set the system gravity to something else (e.g. "0 0 0") every object will still be created with gravity of "0 -9.8 0" unless you explicitly set it to have a different gravity.
As far as I can tell, this renders the system-level gravity setting completely useless.
It would probably be a better interface if per-body gravty defaulted to system gravity, rather than "0 -9.8 0". That's an interface change, but I'd be surprised if anyone relies on the fact that default body gravity is "0 -9.8 0" even when system gravity is set to some other value...
In the meantime, if you want zero gravity physics simulations, the best way is to explicitly set "gravity: 0 0 0" on each ammo-body.
PR #38 will solve this
Attempting to enable phsyics with no gravity. Setting gravity: 0 on system doesn't disable.
https://zest-glaze-settee.glitch.me/