Skip to content

Use terrain elevation for lookAt gesture origin#254

Open
arpitjain099 wants to merge 1 commit into
NASAWorldWind:developfrom
arpitjain099:chore/fix-lookat-terrain-247
Open

Use terrain elevation for lookAt gesture origin#254
arpitjain099 wants to merge 1 commit into
NASAWorldWind:developfrom
arpitjain099:chore/fix-lookat-terrain-247

Conversation

@arpitjain099

Copy link
Copy Markdown

Description of the Change

This updates gesture start lookAt calculations to use the terrain position at the viewport center when available, instead of always using altitude 0. It also preserves terrain pick altitude so the navigator can use the rendered terrain height.

Why Should This Be In Core?

WorldWindowController pan, pinch, rotate, and tilt all rely on the initial lookAt computed at gesture begin. Using terrain elevation keeps gesture motion anchored to the visible surface and avoids rotating around a point below high terrain.

Benefits

  • Gesture interactions stay anchored to surface terrain in mountainous areas
  • Terrain picking now reports the intersection altitude instead of flattening it to zero
  • Includes a focused Navigator unit test for the new terrain-aware camera-to-lookAt path

Potential Drawbacks

  • Gesture begin now performs one center-point terrain pick to seed the lookAt origin
  • I could not run Gradle unit tests in this environment because a Java runtime is not installed

Applicable Issues

Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant