How to interact with Babylon.GUI elements in immersive-ar?

I have almost same problem as mentioned by this user , https://github.com/BabylonJS/Babylon.js/issues/8879

I am creating a simple 3d model viewer which should work in immersive-ar, but the problem is that the Babylon.GUI elements are not interactable during ar-session, I don’t know if its a bug or some mistake from my side, so here is my playground example = https://playground.babylonjs.com/#QA5WSJ#239

the button is working fine in browser,

I am sure @RaananW can help with this :slight_smile:

I didn’t dive into your implementation (as I am mobile right now), but this example has a working UI, you might be able to debug yours based on that - https://playground.babylonjs.com/#KMNNUS#27

1 Like

can you please tell me if you are using it on android or iphone ?, I have tried the playground example you provided on my android phone, and its not working for me, whenever I click the button, the click event is not responding.

I will look into that. if it is not working it’s a regression that we need to solve. thanks for notifying us

I have found that its only not working when we are using fullscreenUI in WEBXR-immersive AR
when using it like
:-
BABYLON.GUI.AdvancedDynamicTexture.CreateFullscreenUI(
“myUI”
)

I tried with mesh panel like this

BABYLON.GUI.AdvancedDynamicTexture.CreateForMesh(
myPlane,
1024,
1024
);

and the buttons are responding normally , I think the problem is not with GUI , but only with AdvancedDynamicTexture.CreateFullscreenUI

The issue was the pointer up event not triggered correctly.

This PR is fixing it. Android AR and Oculus VR tested.

1 Like

thank you for looking into this matter :slight_smile:

1 Like