diff --git a/src/hooks/useControllerGrab.ts b/src/hooks/useControllerGrab.ts index a2526ee..ddd34eb 100644 --- a/src/hooks/useControllerGrab.ts +++ b/src/hooks/useControllerGrab.ts @@ -103,8 +103,12 @@ export function useControllerGrab() { const trigValue = trigBtn ? (trigBtn.value || (trigBtn.pressed ? 1 : 0)) : 0; slot.gripValue = gripValue; slot.triggerValue = trigValue; - // Hysteresis - if (!slot.isGrabbing && gripValue > GRAB_ON) { + if (locked) { + if (slot.isGrabbing) { + slot.isGrabbing = false; + console.log(`[XR][grab] ◼ ${source.handedness} END (locked)`); + } + } else if (!slot.isGrabbing && gripValue > GRAB_ON) { slot.isGrabbing = true; console.log(`[XR][grab] ▶ ${source.handedness} START (v=${gripValue.toFixed(2)})`); } else if (slot.isGrabbing && gripValue < GRAB_OFF) {