New issues with WebXR using Babylon 5 preview version

Hi all, I’ve been experimenting with Web XR (primarily AR) in Babylon 4.2 for a while now and today decided to upgrade to the latest Babylon available, version 5.0.0-rc.2.

However I’m encountering a few different bugs, and wondered if there was a general list of changes that I could check against to narrow down whats happening?

The main bug I am getting is:

  • expected behaviour (working in 4.2): app should start searching for a hit and then showing a placeholder object, before anchoring an object there
  • current behaviour(5): object is immediatly placed at a 0,0,0 position (so camera is inside it), and gives this error:
Uncaught (in promise) DOMException: Failed to execute 'requestHitTestSource' on 'XRSession': Hit test feature is not supported by the session.
    at Observer.WebXRHitTest._this.initHitTestSource [as callback] ...

As a second issue, some previous playgrounds I made to test GUI in AR are also not working, showing white screens, this one in particular (will work if version changed to 4.2):

I can try and recreate the first error in a playground also if thats needed but if any of these problems ring a bell firs then would be good to get some starting points.

Many thanks :slight_smile:

First to your GUI issue - this is actually the browser telling you you are doing something wrong :slight_smile:

AR GUI scale debugging | Babylon.js Playground (babylonjs.com)

image

CreateSimpleButton is not a constructor, so using the new keyword with it is incorrect.

Regarding the second issue - can you provide some information about the environment in which you are working? What device, OS, browser?

Also, can you share a playground where hit-test doesn’t work as expected?

Thanks a lot, in terms of the hit test bug, im working on a Google Pixel 4a phone with Android version 12, Chrome browser (Version 99.0.4844.58), being served from my computer and inspecting through Chrome Devtools.

Ill try and recreate a playground today for that issue.

1 Like

So it looks like weirdly the two errors were connected: I had the ‘new’ keyword in my own GUI buttons but it wasn’t producing any error message, was just breaking the code to skip some part of the process and causing the behaviour above.
Not sure where the hit test error was coming from though.
Anyway lucky i had that old playground to compare, so thanks again :slight_smile:

2 Likes