From 8b70c9c47484586e30abd5940f029758b2bae7c1 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Tue, 12 May 2026 12:05:07 +0000 Subject: [PATCH] Changes Co-authored-by: Reifonas <211114984+Reifonas@users.noreply.github.com> --- src/hooks/useControllerGrab.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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) {