cesium icon indicating copy to clipboard operation
cesium copied to clipboard

Fix camera collision on tileset load

Open ggetz opened this issue 2 years ago • 0 comments

Description

Merge https://github.com/CesiumGS/cesium/pull/11829 first!

This ensures the scene is subscribed to tileset height updates, ie. when a tile loads. The subscription requires the current position, so it should only check for updates when a tile above or below the provided position loads in, and we reset the subscription when the camera position changes.

This is a similar workflow to how clamp to ground works, which is why these functions already exist.

Issue number and link

Fixes https://github.com/CesiumGS/cesium/issues/11824

Testing plan

  1. Go to the Google 3D Tiles Sandcastle
  2. Use the geocoder to navigate to the Grand Canyon
  3. Quickly move the camera down and underground before the view is stable. The camera should no longer ever get "stuck" under terrain as it does in main.
  4. Ensure consistant FPS with Google P3DT
  5. Repeat the above steps with CWT

Author checklist

  • [x] I have submitted a Contributor License Agreement
  • [x] I have added my name to CONTRIBUTORS.md
  • [x] I have updated CHANGES.md with a short summary of my change
  • [x] I have added or updated unit tests to ensure consistent code coverage
  • [ ] ~I have update the inline documentation, and included code examples where relevant~
  • [x] I have performed a self-review of my code
  • [ ] https://github.com/CesiumGS/cesium/pull/11829 is merged

ggetz avatar Feb 16 '24 19:02 ggetz