1. A concise explanation of the problem you're experiencing.
Implementing a ClippingPlane into a BoundingSphere of a 3DTileset produces a repeatable Offset between the Plane and the visible Entity. How do I set the Entity and Plane on the same position?
2. A minimal code example. If you've found a bug, this helps us reproduce and repair it.
const plane = new Cesium.ClippingPlane(new Cesium.Cartesian3(0.0, -1.0, 0.0), 0.0)
let clippingPlanes = new Cesium.ClippingPlaneCollection({
planes: [
plane,
],
});
let tileset = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
url: 'PATH_TO_TILESET.json',
clippingPlanes: clippingPlanes,
}));
tileset.readyPromise.then(function () {
let planeEntity = viewer.entities.add({
position: tileset.boundingSphere.center,
plane: {
dimensions: new Cesium.Cartesian2(tileset.boundingSphere.radius * 2, tileset.boundingSphere.radius * 2),
material: Cesium.Color.WHITE.withAlpha(1),
plane: plane,
outline: true,
outlineColor: Cesium.Color.WHITE
}
});
}
3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
Use the plane as slider (similiar as in the SandCastle Example https://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=3D%20Tiles%20Clipping%20Planes.html&label=3D%20Tiles) for geological subsurface layers. I just copied the base code from the Sandcastle Example into my App but it produces always a little offset between Plane and Entity.
4. The Cesium version you're using, your operating system and browser.
Cesium 1.52, Linux Mint 19 (Tara), Firefox Quantum 63.0.3 (64-Bit),