-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Description
Description:
- A-Frame Version: 1.0.4
- Platform / Device: Android Chrome 82 (currently canary 82.0.4081.2)
- Reproducible Code Snippet or URL: https://dev.nextnowagency.com/camera_ray_test/
Likely tangential to #4412 which is in turn tied to underlying THREE issue mrdoob/three.js#18448
On Android mobile chrome, in immersive WebXR mode (AR or VR), 'raycaster' components on the a-camera cease follow the camera.
In the linked demo,
Expected behavior:
- Outside of immersive mode, can look around with tilt/mouse/keyboard controls; reticle tracks along groundplane
- In immersive mode, can look around with tilt/tracked control; reticle tracks along groundplane
Observed behavior:
- Outside of immersive mode, on Android Chrome 80 (WebXR AR not yet available), can look around with tilt controls; reticle tracks accordingly. On desktop, can look around with mouse controls; reticle tracks accordingly. On AR-enabled Chrome 82 (canary) on Android, camera view rotation appears to twitch with device rotation and track on 1 axis with touch, but is otherwise fixed directly downwards.
- In VR immersive mode on chrome 80, and in VR or AR immersive mode on chrome 82, can look around, but reticle resets and stays stuck on or about the scene origin; hit tests no longer return the point the camera is looking at. Rotation of reticle still updates, so the data is accurate in the camera's rotation matrix, the A-Frame raycaster simply is not sourcing it effectively.
Short of diving into the A-Frame raycaster component source, I would guess it's using something akin to Object3D.getWorldDirection() for its ray generation, which would mean it will be broken due to the getWorld* immersive-mode THREE breakage until and unless it is rewritten to e.g. transform a ray independently through the available and demonstrably correct raw transform matrices.
Chrome 80, AR unavailable, expected behavior outside immersive mode

Chrome 82, AR available, stuck view outside immersive mode

Chrome 82, in AR immersive mode, hit test result stuck at origin


Chrome 82 in VR immersive mode; essentially identical to Chrome 80 in VR immersive mode, hit test result equally stuck at origin.
