Skip to content
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

Camera rotation point is below the Earth's surface #787

Open
kyonifer opened this issue Aug 28, 2018 · 0 comments
Open

Camera rotation point is below the Earth's surface #787

kyonifer opened this issue Aug 28, 2018 · 0 comments

Comments

@kyonifer
Copy link

Description

The default behavior for dragging with the right mouse button down is to rotate around a fixed point. At higher camera altitudes this appears to rotate around the point on the Earth that the wwd.navigator is looking at. However, when the navigator is closer to the terrain it becomes apparent that it is actually rotating about a fixed point which is often below the Earth's surface (presumably the wgs-84 ellipsoid). This is undesireable as it causes the navigator to move away from the thing you've asked it to be looking at, instead of rotating around it.

Steps to Reproduce

This fiddle points the camera at the terrain at close range and demonstrates the issue. Hold the right mouse button and drag downward, and you will observe the street in front of the camera fly out of view.

Expected behavior:

The scene should rotate about the point on the ground, keeping it in view. Here's a fiddle that has the expected behavior, where rotating the camera rotates the scene instead of moving away from it. This fiddle manages to do that by setting the elevation model to zero as a workaround. It appears that if the elevation model is zero then the camera rotates about the surface correctly, leading me to believe the issue is that the point of rotation is on the underlying ellipsoid (I haven't dug in far enough to find it though).

Actual behavior:
The first fiddle above.

Reproduces how often:
Always.

Operating System and Version

Reproduced on Linux and Windows, using both the tagged 0.9 release and develop. On develop the workaround is slightly different due to ZeroElevationModel not existing. On develop one can instead workaround by creating a WorldWind.ElevationModel() with full coverage, which again disables terrain elevation and causes rotation to occur about the rendered surface instead of below the surface.

Additional Information

May be a subtask of #608

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant