From 26dcfc4b80ee959c5a55a1b245b98269ab5eee2c Mon Sep 17 00:00:00 2001 From: Alexandr Date: Mon, 28 Jul 2025 23:03:34 +0400 Subject: [PATCH 1/2] fixed: Use getInputSourceState instead of deprecated useXRHandState --- docs/tutorials/hit-test.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/tutorials/hit-test.md b/docs/tutorials/hit-test.md index 1146fa2c..26695146 100644 --- a/docs/tutorials/hit-test.md +++ b/docs/tutorials/hit-test.md @@ -13,8 +13,8 @@ const hitTestPosition = new Vector3() const store = createXRStore({ hand: { - right: () => { - const state = useXRHandState() + right: (xr) => { + const state = xr.getInputSourceState('hand', 'right') return ( <> From 392eb5d69e3cf6a8c90e54a83a954e743f2f86d6 Mon Sep 17 00:00:00 2001 From: Alexandr Date: Tue, 29 Jul 2025 19:45:19 +0400 Subject: [PATCH 2/2] edit hit-test --- docs/tutorials/hit-test.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/tutorials/hit-test.md b/docs/tutorials/hit-test.md index 26695146..51ee2a7c 100644 --- a/docs/tutorials/hit-test.md +++ b/docs/tutorials/hit-test.md @@ -13,11 +13,12 @@ const hitTestPosition = new Vector3() const store = createXRStore({ hand: { - right: (xr) => { - const state = xr.getInputSourceState('hand', 'right') + right: () => { + const state = useXRInputSourceStateContext() + if (!state?.inputSource) return null return ( <> - + {