fix: decouple hand tracking from crosshair focus

This commit is contained in:
Tom Boullay
2026-04-29 11:13:11 +02:00
parent 882f3cc71b
commit 7958b2c62a
5 changed files with 73 additions and 6 deletions
+4 -3
View File
@@ -14,10 +14,11 @@ export function HandTrackingProvider({
children: ReactNode;
}): React.JSX.Element {
const sceneMode = useSceneMode();
const { focused, holding } = useInteraction();
const isInInteractionZone = focused !== null || holding;
const { nearby, holding, handHolding } = useInteraction();
const enabled =
isDebugEnabled() && sceneMode === "physics" && isInInteractionZone;
isDebugEnabled() &&
sceneMode === "physics" &&
(nearby || holding || handHolding);
const snapshot = useRemoteHandTracking({ enabled });
return (