How to set up hit-test AR in A-Frame?

134 views Asked by At

How can one do AR hit-test (markerless) scene in A-Frame? I’ve tried 6 or 7 examples and none of them work.

I need this to work on iPhone and I’m using Variant Launch. They have a very nice example using ThreeJS (source) which works extremely smoothly – see QR code attached. I would like to achieve the same kind of experience using A-Frame. (edited)

threejs ar example

1

There are 1 answers

0
Kieran F. On

I had the same question and made a demo here with a new component "ar-hit-test-simple" (to distinguish from the default A-Frame ar-hit-test component)

preview: https://launch-aframe-hit-test-simple.glitch.me/

Tapping to "select" will reposition the rover model.

code: https://glitch.com/edit/#!/launch-aframe-hit-test-simple

The new component was largely based on this repo: https://github.com/stspanho/aframe-hit-test