CesiumGS / CesiumGS/cesium

computeViewRectangle not working in oblique or non-north-up views

Open
#9,516 4 comments 0 reactions 1 assignee Claimed by @lilleyse View on GitHub
category - architecture / api category - camera type - enhancement
Dominant language
JavaScript
Stars
15.7k
Forks
3.9k
Avg merge
4d 6h
Merged PRs (30d)
34

Description

`camera.computeViewRectangle` works well in the usual case of looking straight down at the sphere with north towards the top of the screen. However, when the camera is rotated to look southwards or down at an angle the results become unreliable.

The below example loads with a view out facing south over the Caribbean and a rectangle entity representing the computed view rectangle for that position. You'll notice you have to move the camera backwards to see what was returned as the view rectangle.

Sandcastle example: https://sandcastle.cesium.com/#c=pZJNj5swEIb/ipUTSHSAQj5ISdQ27a1VpWzVExcHZhOrxqa2IUpX+e+1cTb7qb3UFzy233fmGWagigwMj6jIigg8kg1q1rfwazwLqkk9xhspDGUCVTWJyB1RKBpUW/zTozbfZYNLYlSP5Bx+qMRgLWvaoqLW0nuDj+1lJfwWOqmZYVI8TbuhytgdFVmQFbM8KSBN5xF5N51nWbJIYJ7MIpK/z4v5tIBFNnP5LoYNU1i/6ZhAlhYRSSCdptYzgSKbhld9370lzPOLYjF+kywPHYxjRWGYOT2wjjFDDbRpgrtKELtcaVTsOZIluRy5VUupGiaoTWQvnvQKatl2vUH3I7b36uDyRNcoEPZc7hCQc9ZpyZowejBuraVilC+vNJJLBduvX+DIzOET7w7UYYVecq7EeeQhN1Q0NdWGoyv/p5R8R9Xn3hgp7DBsfE3EFUWuVbmZuO2Fb34QekDfFbiCw2PW1X+z2hTjsE2iSanNieP6Hv4jazupDOkVDwBig23HXdJ419e/0UCttRO6p2X8WFo2bCCsWb0y86TmVGt7c9tzfsP+WuR1Gdv3L6RcUgu5/zGg4vTknh3S9Td/CABlbMPXlcb3+pnzPw

Browser: Chrome

Operating System: Ubuntu

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.