Hello,
I’m working on plotting points on both 3D tilesets and terrain in Cesium, with the ability to toggle 3D tileset visibility. We’ve made progress but are facing challenges with smooth transitions when toggling tileset visibility. Below are our findings and the issue we’re encountering. I’d appreciate guidance on whether our approach is optimal or if there are better methods to achieve smooth point plotting and clamping during tileset visibility changes.
Findings
- Clamping Support: Using CLAMP_TO_3D_TILE works correctly for both terrain and 3D tilesets during point plotting and dragging.
- Height Detection: Able to fetch accurate height information for any location, whether on terrain or a 3D tileset with clampToHeightMostDetailed.
- Surface Type Detection: Able to detect whether a point lies on a 3D tileset or terrain.
- Visibility Toggle Issue:
- It does not automatically re-clamp points to the visible surface (terrain or tileset) when tileset visibility changes.
- Manually updating point positions based on the current surface is inefficient, especially since it requires determining which points are on the tileset.
- Changing the height reference or clamping mode alone doesn’t work as expected—points retain their previous height, even when the underlying surface (e.g., tileset) is no longer visible.
- Behavior with Multiple Tilesets: The current approach struggles with scenarios involving multiple overlapping tilesets at a single location, leading to unreliable clamping and transitions.
Desired Outcome
We aim for a solution where points seamlessly transition between clamping to terrain and 3D tilesets as visibility toggles, without manual repositioning or performance overhead, even with multiple overlapping tilesets.
Any insights, suggestions, or pointers to relevant documentation/examples would be greatly appreciated. Thank you!