We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 51d88ab commit 8f49bc6Copy full SHA for 8f49bc6
examples/hit-test-anchor/app.tsx
@@ -11,7 +11,6 @@ import {
11
useXRRequestHitTest,
12
useXRAnchor,
13
useXRInputSourceStateContext,
14
- useXRInputSourceState,
15
} from '@react-three/xr'
16
import { useEffect, useRef } from 'react'
17
import { Matrix4, Mesh, Vector3 } from 'three'
@@ -127,6 +126,9 @@ function Point({ index, left }: { left?: boolean; index: number }) {
127
126
useEffect(
128
() =>
129
(left ? useLeftPoints : useRightPoints).subscribe((state) => {
+ if (index >= state.length) {
130
+ return
131
+ }
132
ref.current!.position.copy(state[index])
133
}),
134
[index, left],
0 commit comments