Closed Happyrobot33 closed 1 year ago
Since it isn't stated I propose to the fix that by default flying should be disabled outright if gravity deviates.
At the very least it should probably be a compatability mode toggle, since we have no way of knowing what a script could be doing with gravity.
Thanks Happy for posting.
Potential fix in OpenFlight-1.5.2-beta.2
Additional testing still required just to make sure there isn't any weird side affects, and I want to audit it too to make sure it doesn't have any negative impacts on usability
Potential addition is throwing a warning when any other script except openflight scripts modify movement speeds or gravity
resolved in latest release, could still use some improvement by hooking into other scripts though
Describe the bug Essentially if you fly out of swimming areas, your gravity will never be reset properly, leaving you floating
To Reproduce Steps to reproduce the behavior:
Tracked issue The issue is that we record gravity every time you take off to reset back to when you land. When you take off from water prefabs, the water prefab has already set your gravity low, so when we poll it, we get what the water prefabs gravity is, not the true worlds gravity
Potential Fix Change the script setup to save the world gravity once upon loading into the instance, and then always reset to that value. We also need to ensure that there is a way in-editor to re-enable to dynamic gravity feature, and expose a API endpoint to also tell the script to re-grab a gravity value, so world creators can still set gravity without issues if they would like