WebXR anchors and hit-test

Hi, I am working on webxr with babylon js, placing anchors in real world using hit-test and anchor system. But when I place anchors(Arrows) very close to camera it is moving with camera. It doesn’t get anchored to surface in this case. I tried to solve by using pickRay and skybox still I get same result.

Can you please confirm if this is a limitation related to ARCore?

The “wandering” typically occurs when an arrow is placed before AR tracking has detected a stable surface near the camera. At very close range (<30–40 cm), hit-test rays often return noisy results because there isn’t enough geometry mapped yet. Anchors created at those poses can therefore drift or wander.

please let me know you views on this.

cc @docEdub

If the headset is moving the anchors as it updates the tracked surfaces then there’s not much we can do about it. Is that what you’re describing?

If you post a link to a playground example that shows the issue (to make sure we’re on the same page), I’ll be happy to investigate! The WebXR playgrounds from the docs may be a good starting point.

Hi, I am currently testing with a android phone. Please find link of the the working example - https://webxr-babylon.web.app
Steps to test:

  1. Enter AR
  2. select arrow
  3. enter immersive-ar
  4. Once detecting environment finishes you can start placing arrows

Test Scenarios:(problems I am facing)

  1. Place arrow very close to camera like on desk/laptop, it moves if we move camera
  2. When we place arrow on surface and arm chair we can see the offset on position, example if we tap on table, we can see arrow is added however when we move towards it we can see offset in position of the arrow

can you please take a look at the behavour, and let me know your thoughts. Thanks!

Yes, I will investigate.

Hi,

can you please confirm if plane detection and depth sensing feature is still experimental?

cause plane detection need some flag to be ON on android device and depth sensing is also not working as expected.

If you are turning flags on that are not on by default, then it sounds like those features are experimental for that device.

If you post the device details (manufacturer, model, OS version) and browser version, I might be able to tell you more.

Device I am using is: Google Pixel 8 Pro.
I know for sure plane detection is experimental for this device.

Ok, thanks. Here’s an example to try that uses WebXR directly without using Babylon.js:
https://cabanier.github.io/webxr-samples-1/proposals/plane-detection.html

Do you see the same drifting/wandering with this example?

This link I am not able to open in android device. Nothing is happening when I click on start AR.

I tested it on my VR headset and the anchors don’t drift at all, so the drifiting is most likely being caused by the phones themselves, especially since it’s still an experimental feature.

Hi,

Thanks for you help!

Could you please share if there are plans for plane detection and other experimental features to become a fully supported feature in the near future?

It would help us plan whether to build on top of it or wait until it matures.

Thanks!

I don’t know what Google’s plans are for supporting experimental WebXR features on Pixel phones.