From e8ba6aa492ae2407db40c17070e8df91011e2338 Mon Sep 17 00:00:00 2001 From: bakedpotatolord Date: Mon, 21 Jul 2025 21:25:31 -0600 Subject: [PATCH] fix multi-widget bounding box accuracy --- src/kiri/core/selection.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/kiri/core/selection.js b/src/kiri/core/selection.js index 8349cd26..8f74f751 100644 --- a/src/kiri/core/selection.js +++ b/src/kiri/core/selection.js @@ -49,8 +49,13 @@ function update_info() { const ui = api.ui; let bounds = new THREE.Box3(), track; for_meshes(mesh => { - bounds = bounds.union(mesh.getBoundingBox()); + let box = mesh.getBoundingBox().clone(); track = mesh.widget.track; + let {pos} = track + box.min.add(pos); + box.max.add(pos); + console.log(structuredClone({pos})) + bounds = bounds.union(box); }); if (bounds.min.x === Infinity) { if (selectedMeshes.length === 0) {