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

Fixes camera not tracking trackedEntity with HeightReference #10805

Merged
merged 3 commits into from
Sep 21, 2022

Conversation

sanjeetsuhag
Copy link
Contributor

Fixes #10804

The cause of this issue was that when a TerrainProvider with availability was used, the ModelVisualizer.prototype.getBoundingSphere was returning the result from its previous invocation. The fix was to simply clear the previous result in the _modelHash object for a given entity.

See this Sandcastle - test with different HeightReference types and with/without CesiumTerrainProvider.

@cesium-concierge
Copy link

Thanks for the pull request @sanjeetsuhag!

  • ✔️ Signed CLA found.
  • CHANGES.md was not updated.
    • If this change updates the public API in any way, please add a bullet point to CHANGES.md.
  • ❔ Unit tests were not updated.
    • Make sure you've updated tests to reflect your changes, added tests for any new code, and ran the code coverage tool.

Reviewers, don't forget to make sure that:

  • Cesium Viewer works.
  • Works in 2D/CV.

@sanjeetsuhag sanjeetsuhag requested a review from ggetz September 21, 2022 18:50
@ggetz
Copy link
Contributor

ggetz commented Sep 21, 2022

Awesome, thanks for the quick fix @sanjeetsuhag! Would it be possible to write a unit test for this case?

@sanjeetsuhag
Copy link
Contributor Author

sanjeetsuhag commented Sep 21, 2022

@ggetz Updated - added checks to ensure that the data in modelHash is reset in all cases.

@ggetz
Copy link
Contributor

ggetz commented Sep 21, 2022

Thanks @sanjeetsuhag!

@ggetz ggetz merged commit 4a7582b into main Sep 21, 2022
@ggetz ggetz deleted the tracked-model-bounding-sphere-fix branch September 21, 2022 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

trackedEntity with CLAMP_TO_GROUND is not tracked
3 participants