Been working on integrating WebXR Hit Test module to the Engine.
It allows to raycast representation of the real world geometry by underlying AR system. So applications are various, like: placing objects in your rooms, or pictures on walls. Painting stuff on real world. Basic LIDAR. And more ways to anchor experience to the real world geometry.
The way Hit API works, it “can” give you hit test results, but it does not guarantee them. It depends on your underlying AR system.
Demo works this way: you start it, look a bit around and on the floor, maybe walk a bit looking a bit on floor. So AR system recognises floor plane. While doing it, touch your finger on screen, on the floor, maybe move it a bit around. Eventually it will pick up for plane, and start drawing grass there.
Probably some UI could be added to notify that no hit test results been available yet, to understand why it is not reacting yet.
Also, simply expect some regressions in browsers, as it is experimental feature by W3C, and they change it times to times.
Hey @moka, is it possible to add better messaging to the user as to why AR and/or Hit Test might not be available? I’m assuming this can be for various reasons (not running under https, somehow being blocked within an iframe, and so on…)
There has been a regression in WebXR AR Module in recent Chrome, they aware of it.
Bear in mind - it is very experimental feature in browsers, and is not production ready, only for early experiments. Also it is a subject to change.
My camera is activated but it looks like there’s no floor detection. I tried different rooms with different lights but no luck. Strangely, with the same device, it’s working well with the Hit-test example on Google Chrome and even the “AR scene viewer”.