fix: decouple hand tracking from crosshair focus
This commit is contained in:
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user