From 5f306ed69ad447603d3a3f72289336a42987d4db Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Thu, 14 May 2026 18:26:29 +0000 Subject: [PATCH] Changes Co-authored-by: Reifonas <211114984+Reifonas@users.noreply.github.com> --- src/components/three/XRGrabbable.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/components/three/XRGrabbable.tsx b/src/components/three/XRGrabbable.tsx index e72cf7a..03ace6e 100644 --- a/src/components/three/XRGrabbable.tsx +++ b/src/components/three/XRGrabbable.tsx @@ -47,7 +47,7 @@ const _tmpQuat = new THREE.Quaternion(); * On release the group keeps its last pose (we don't write to the store — * the manual fine-tuning sliders remain available as additional offsets). */ -export function XRGrabbable({ allowScale = false, onGrabStart, children }: XRGrabbableProps) { +export function XRGrabbable({ allowScale = false, lockedActive = false, onGrabStart, children }: XRGrabbableProps) { const groupRef = useRef(null); const grab = useControllerGrab(); @@ -63,6 +63,14 @@ export function XRGrabbable({ allowScale = false, onGrabStart, children }: XRGra const L = snap.left; const R = snap.right; + // Locked: ignore all grab input — release any in-progress grabs and bail. + if (lockedActive) { + if (single.current) single.current = null; + if (dual.current) dual.current = null; + if (haloRef.current) haloRef.current.visible = false; + return; + } + const lActive = L.isGrabbing && L.hasPose; const rActive = R.isGrabbing && R.hasPose;