pmndrs / xr

🤳 VR/AR for react-three-fiber
https://pmndrs.github.io/xr/docs/
Other
2.2k stars 157 forks source link

android AR does not trigger onClick, onPointerOver, and onPointerDown #350

Closed bbohlender closed 1 month ago

bbohlender commented 2 months ago

simple AR scene with a mesh w/ boxGeometry using the latest react-three/xr 6.2.8 codesandbox: https://codesandbox.io/p/sandbox/xr-events-simple-5gvg9f

The mesh has log messages for most events (onClick, onPointerOver, onPointerDown, etc.) The cube also changes color in response to onClick and onPointerOver.

As mentioned previously, this works as expected on Quest 3 and non-XR modes, but fails on Android AR mode. Android specifically doesn't register onPointerDown or onClick. onPointerMissed also I believe. Note that onPointerUp DOES trigger though.

In contrast to my experiment, the most recent react-three/xr "layers" example work just fine in all modes including Android AR. The onClick event triggers as expected, unlike the onClick.