The ClampToGround behavior in Cesium no longer seems to recognize Google Photorealistic 3D Tiles as “the ground” in both Cesium Stories and Sandcastle.
I have tested this with KML and GeoJSON datasets and the behavior is the same. The data clamps below the Google 3D tiles (presumably on the ellipsoid?) and no longer recognizes the 3D tiles as a ground element, even if the globe is disabled.
ClampToGround was working correctly (placing the elements on top of the Google tiles, not below them) in Cesium Stories, but stopped working a couple of weeks ago and now Stories that were working perfectly are kind of useless.
For Sandcastle, I have tried several varieties of forcing ClampToGround either on the KML Load or by accessing the entity values. ClampToGround is set as altitudeMode in the KML files. I even deleted all Z-axis values on one dataset but it is still the same result.
Here is a Sandcastle that shows the current issue: Cesium Sandcastle
Any assistance in resolving this would be greatly appreciated!
Update: this seems to specifically affect Points in both GeoJSON and KML. I am able to get Polygons to correctly map to the Google Tiles.
Hi,
You will need to set enableCollision in the Cesium3dTileset
constructor to have clamping work for 3D Tilesets. This is automatically set when using createGooglePhotorealistic3DTileset.
Unfortuately I don’t think this is well documented in HeightReference
. I’ve opened an issue for us to improve our documentation as I have run into this issue as well.
Here is an example sandcastle with that that setting. Is this what you were expecting?
1 Like
Mark,
Thanks for your continued support in resolving this matter.
This definitely fixed the issue in Sandcastle, but the same problem remains in Stories. Is it possible that Stories is calling the asset
googleTileset = await Cesium.Cesium3DTileset.fromIonAssetId(2275207);
instead of the tileset
googleTileset = await Cesium.createGooglePhotorealistic3DTileset();
when it is generating the terrain?
Perhaps this is a simple fix as well. It would be great to get Stories working again.
Also - do you have any advice for offsetting the dataset from the collision point so that labels do not clip?
Thanks again!
-Jack
VRIDIAN