cesium-native icon indicating copy to clipboard operation
cesium-native copied to clipboard

Improve accuracy/performance of camera-inside-tile test for non-region tiles

Open kring opened this issue 4 years ago • 0 comments

When the renderTilesUnderCamera tileset option is set, we consider tiles that are "under" the camera visible even if they're actually outside the view frustum (e.g. because the camera is looking up). This is useful to reduce that chances of the player falling through the terrain because it disappears out from under them, for example.

For tiles with a bounding volume that is not a region, though, this check is a little dodgy after #327. It estimates the bounding region by projecting the coordinates of the corners of the actual bounding volume, and then checks if the camera is in that region. A more accurate and performant approach would be to cast a ray down from the camera and see if it intersects the bounding volume.

kring avatar Nov 02 '21 04:11 kring