Placing a Tileset at the Camera Position with Correct Rotation

The sandcastle does not seem to contain the line
tileset.root.transform = Cesium.Matrix4.clone(Cesium.Matrix4.IDENTITY);
which is pretty important here. Adding this line (immediately after the tileset was created) makes it appear at … roughly the right height (not perfect, but close).

I didn’t go through the math in your sandcastle. But there are many details to consider when trying to place a tileset. The root.transform mentioned above is only one of them. But another one is that you are using the bounding sphere center as the reference point. Imagine that tileset (the building that you are adding there) contained one reeeeally tall tower (like some radio tower, 500 meters high). Then the bounding sphere center would be at a height of ~250 meters. Using that as a reference would place the tileset ~250 meters below the ground.

The question about “placing tilesets” (or more generally: “placing data in a geospatial context”) comes up pretty frequently…

I should probably try to write up some sort of tutorial for that :thinking: