-
Notifications
You must be signed in to change notification settings - Fork 1
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
Vessels Far from Scene Origin and Physics Accuracy #14
Comments
If too far away - disable collisions if landed - pin to the surface (until close to the origin again) |
Since vessels will need to act like buildings when too far away from origin, maybe they can be combined into one. |
Vessels and buildings are already the same thing, as of 2024/01/11 (and a fair bit before too). Vessels that are landed far away from the origin (not flying) will need to be pinned, until they come near the origin again. |
Could it be considered to make use of 64-bit doubles on the simulation side and emulated doubles on the rendering side? It would then be practical to have separate coordinate systems for different distances - 64 bits should(tm) be enough for a solar system, but not for interstellar travel. |
The issue is with collisions specifically. Collisions happen in unity's scene space. And the proposed solution is to disable physics for objects far away by pinning them to the surface (if they're landed) or by letting them float on their orbits otherwise. |
Reopened due to only being partially fixed (disables the 'parts' of vessels that are too far away - so they don't update or render). It still needs to pin the landed vessels since the collision will now be disabled for them. |
Current Behaviour:
If a vessel is landed, and you set the scene origin far away from it (eg by switching to a different vessel), the landed vessel will eventually wiggle its way through the planet.
This happens because collisions are calculated in scene space, and when the scene origin is far away, the precision is not adequate.
Expected Behaviour:
Vessels remain where they were left, regardless of how far away the scene origin has gone.
How to Fix:
Vessels that are landed should be locked to their position relative to the landed on body while too far away.
Vessels should have their collisions turned off while too far away (both flying and landed).
The text was updated successfully, but these errors were encountered: