From 6ae8972612b5d132b83dcd601b9b532aea14c89b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20D=C3=A4hnert?= <1017301+mdaehnert@users.noreply.github.com> Date: Sun, 24 Nov 2024 15:56:27 +0000 Subject: [PATCH] feat(Cesium): Add configuration to optionally disable surface collision detection. --- web/client/components/map/cesium/Map.jsx | 3 +++ web/client/configs/localConfig.json | 1 + 2 files changed, 4 insertions(+) diff --git a/web/client/components/map/cesium/Map.jsx b/web/client/components/map/cesium/Map.jsx index db38b2b1d8..79af27a3a5 100644 --- a/web/client/components/map/cesium/Map.jsx +++ b/web/client/components/map/cesium/Map.jsx @@ -192,6 +192,9 @@ class CesiumMap extends React.Component { } } + // Allow camera to clip through surface for viewing underground objects. + map.scene.screenSpaceCameraController.enableCollisionDetection = this.props.mapOptions?.enableCollisionDetection ?? true; + this.forceUpdate(); map.scene.requestRender(); } diff --git a/web/client/configs/localConfig.json b/web/client/configs/localConfig.json index 7703f683e3..2138f96311 100644 --- a/web/client/configs/localConfig.json +++ b/web/client/configs/localConfig.json @@ -40,6 +40,7 @@ "showGroundAtmosphere": false, "enableFog": false, "depthTestAgainstTerrain": false, + "enableCollisionDetection": true, "terrainProvider": { "type": "ellipsoid" }