fix clipping planes offset once more

This commit is contained in:
Yeicor
2024-03-03 11:39:41 +01:00
parent ccb8d1c4e7
commit 71887f75e6

View File

@@ -126,7 +126,7 @@ function onClipPlanesChange() {
props.viewer.renderer.threeRenderer.localClippingEnabled = true;
// Due to model-viewer's camera manipulation, the bounding box needs to be transformed
bbox = SceneMgr.getBoundingBox(sceneDocument.value);
bbox.applyMatrix4(sceneModel.matrixWorld);
bbox.translate(scene.getTarget());
}
sceneModel.traverse((child) => {
if (child.userData[extrasNameKey] === modelName) {