-
Notifications
You must be signed in to change notification settings - Fork 27
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
Add fixed_horizon option to the ObserverNavigationNode #379
Conversation
Pull Request Test Coverage Report for Build 9953781810Details
💛 - Coveralls |
Could we use the ecliptic plane as the horizon in outer space? Or would this just lead to weird rotations when entering or leaving a planet's frame? |
Yes, this could be possible. But a smooth transition is definitely non-trivial. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks interesting.
Some side effects I found to consider:
- When entering a body's frame the view is snapped to the horizon, since the observer enters the frame quite early (far from the the planet) the view can be snapped to the horizon quite rough, also leading to >90° instant rotations leading to disorientation.
- When traveling through outer space and clipping through a body's frame, it is possible that the observer is suddenly rotated even though this is unwantd (especially noticeable when approaching a body's frame by strafing up- or downwards).
- The adjustment of the rotation means that escaping the body's frame by strafing left or right is not possible anymore as this leads to a sideways orbit around the body. Strafing down leads to the observer getting (soft) stuck at the center of the body.
It should be made clear, that this option should only be used in use-cases where the observer is close to a planet's surface for the whole runtime, to avoid any of the mentioned issues.
This feature may also need to be revisited if it should be used in a more general context.
Yes, that's why I wrote "this breaks if we are in outer space or looking straight up or down" 😄. |
Ah then I misunderstood. I thought it meant:
My recommendation was more along the lines of:
😁 I mean it works fine as a workaround and putting it into the main branch will do nothing if not enabled but I guess we should make a note or an issue somewhere to revisit this if it is supposed to be more than a workaround imho |
This adds a
fixed_horizon
parameter to the ObserNavigationNode. If this is set totrue
, the observer is always rotated so that the horizon of the active object is always leveled.For now, this breaks if we are in outer space or looking straight up or down. But it can already be very useful in cases were we know that the user is always close to a planet.
In the future, we could try making this work in outer space as well by checking the distance to the active object and gradually transitioning to the fixed horizon based on the distance.
You can enable this in DFN like this: