Tracking position GUI for WebXR / VR

Hi Everyone,

I have a problem in making GUI tracking position on WebXR, in normal web 3D display, gui tracking position works well, but when I enter WebXR mode, it doesn’t work. I have tried to use the AdvanceDynamicTexture.CreateForMesh() function to display it in 3D but it still doesn’t work. Does anyone know the solution? Thank you.

Hi,

What exactly doesn’t work? Did you not see the ui, is it too small/large? An exception is thrown?

If you can reproduce this for me in the playground it will be great

Hi @RaananW,

I am very sorry I took too long to reply to your message. What I mean doesn’t work well is that when I try the scene on my oculus quest, the tracking position of the gui is not visible on the object, but it is visible on my camera, very small and sticks to every movement of my camera. I attach an example of a playground tracking position using webxr. Thanks again for replying to my question.

https://www.babylonjs-playground.com/#XCPP9Y#3195

Hey, I’ll look into that. On first check (mobile) it seems to work correctly, but I suspect canvas resizing is the issue you are seeing and I’ll have to test on the oculus quest.

Thank you

Got the problem, it seems like the rotation is inverted for some reason so the gui is not pointing towards the camera. Looking into that now

1 Like

Thank you so much !!

Issue detected, PR is here - [XR] Babylon calculates the view matrix of the main camera by RaananW · Pull Request #8487 · BabylonJS/Babylon.js · GitHub