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

Erratic clampToHeight and heightReference behavior when toggling tileset on/off #9680

Closed
srothst1 opened this issue Jul 15, 2021 · 2 comments · Fixed by #11604
Closed

Erratic clampToHeight and heightReference behavior when toggling tileset on/off #9680

srothst1 opened this issue Jul 15, 2021 · 2 comments · Fixed by #11604

Comments

@srothst1
Copy link
Contributor

Desired functionality: Allow users to accurately toggle billboards on and off their 3D Tileset. In this application, terrain data would likely be turned off to improve performance.

Current functionality:

When the viewer is loaded for the first time, the billboards are correctly placed on the 3d tileset (with HeightReference.NONE and getting the position using viewer.scene.clampToHeight).

After clicking the toggle button once, the billboards are properly placed on the ground. This is because HeightReference.CLAMP_TO_GROUND is used and we are lading Cesium World Terrain.

However, when clicking the toggle button a third time (with the goal of showing the 3D Tileset), we see that the billboard are "stuck" on the ground yet the labels are positioned above the 3D Tileset.

A .gif showcases this behavior

Upon further testing, I noticed that this error also occurs in the following circumstances:

  • This error seems to occur for any number of billboard values.

  • If toggled is initialized to true (`let toggled = true;) we see even more erratic behavior when toggling the tileset on and off. It seems like the billboards disappear and then re-appear.

This issue stems from a community forum post. Here is a sandcastle example that showcases the error.

Browser: Chrome

Operating System: Windows 10

@AnonymousSausage77
Copy link

AnonymousSausage77 commented Dec 15, 2023

Is there any news on this? I am facing this issue currently. My solution at the moment is to completely rebuild the viewer whenever the tiles are toggled which is not a particularly flashy solution.

@ggetz
Copy link
Contributor

ggetz commented Dec 15, 2023

@AnonymousSausage77 #11604 will be adding height references that allow billboards and entities to clamp to 3D Tiles without using viewer.scene.clampToHeight, as well as clamp to terrain. The ability to toggle between the two is accounted for there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants