So when we enter AR, plane detection for edged horizontal surfaces is working for the placement reticule, how can I then raycast to those surfaces after placement ie. to move a product around between a table and the floor (if they are valid surfaces). Is it also possible to add a material to those planes as a preview of detected surfaces?
Original Post on Discord
by user 103054507105067008
Thereās a differentiation to make: thereās two APIs in WebXR, āhit testingā and āplane trackingā. For reticle placement we use āhit testingā, which may or may not use the underlying detected planes.
More devices support hit testing than support plane tracking
That being said, planes can be visualized; Iāll add an example (may only be next week) for how to turn them into meshes and show things on them
Thanks, that makes sense, I wonder what devices donāt support plane detection although that could be more a mix of browser feature support perhaps.
Is there any example of placement with the WebXR hit test? Iām trying to make a copy of the WebXR Component and figure out how it is doing it, some method to call if in AR like webXrHitTest that returns a world position would be super useful
by user 103054507105067008
We can close this question as answered right? Seems your other posts indicate you found the right way (attach to XR events, in onBeforeRender do stuff with the XR Frame)
Only if there is a way to see the plane material if there is a way to visualize them, Iām happy for you to mark this as answered if a solution for that is definitely coming
by user 103054507105067008