Facing issue with GUI

Hi Team,

I am trying to add markers using 2 approaches
1st approach-

So here I am mapping the list of meshes and adding marker for that . For this one I am looping it with 4 meshes.

2nd approach-

I want the XR version of it, so,To put markers on same scene I am just trying to draw the markers on the plane.(Because Normal GUI above one is not working properly in VR)


Here is mesh loop is running. Only I am putting GUI in the plane I am instead of linking with the mesh I am using parent mesh.
But in the output its is rendering only 2(I am looping it with 4 mesh) , and its rendering weirdly.

Our main focus is bringing this marker to the vr mode . And if user is clicking marker we need to show the linked docs/data.
Why the second approch is not working properly ? Any better approach for this in XR?

(It’s a GLB model)

The first approach should be working on XR. What do you see when it’s in XR mode?

Yes, It is working but In XR mode its coming some where middle of the /behind mesh . so it is becoming unclickable .

@RaananW any idea what might be causing this?

i’ll need to see the behavior to understand. can you reproduce this?

here I have tried the same logic - https://playground.babylonjs.com/#WIF7NN#232

In android simply we can run this. In this code , in VR everything is based on screen tap and gaze pointer.

Here I have tried multiple different marker for the plane and tested with XR.

1 Like

ping @RaananW

1 Like

This is a known issue with billboard mode when using it in XR. You can read about it here - Billboards do not work as expected in XR mode - Bugs - Babylon.js (babylonjs.com)

Try using lookAt on each frame to set the plane’s rotation correctly, or maybe try using our 3D GUI elements instead

1 Like