Bug In VR with trigger Enter/Out/Move in Firefox, BUT not in EDGE

Hi, during a test to solve a problem with these triggers , I have seen that I don’t have issue in Edge while I have some in Firefox, maybe Edge test if the gaze is IN/OUT more often than Firefox.
https://playground.babylonjs.com/#M779CA#16 look at this PG. If you download it and launch firefox, you will have issues with these triggers, but on Edge I don’t have any issue.
If we use mesh with actionManager, the trigger Over is working well ^^ but it’s not a GUI element.
It seems not to have any problem with PG only when I am not in PG

Pinging @trevordev

@Mathieu Are you including pep.js? as described here First Steps - Babylon.js Documentation
eg. does this result in defined

Copy to clipboard

if (window.PointerEvent) {
	alert("pointer events DEFINED");
} else {
	alert("pointer events UNDEFINED");

I didn’t but now that I have included pep.js I still have the issue.
And yes the pointer events is defined.

Thanks for checking that, I’ll try debugging deeper to see what the problem might be and let you know what I find.

1 Like

@Mathieu I gave it a try and it seemed to work . What device are you using, do you have controllers attached, when you say gaze in/out are you talking about only using your head as input? Just so I understand you are talking about the the Entree popup that should appear when hovering correct?

1 Like

I am not using phone yet, just the vr on firefox/edge browser on computer. For now it seems to work, i will keep testing today and I will keep you in touch. Good Job @trevordev ! And I use SetTimeout not to use controller because if it’s a gamepad controllers it’s not like other controllers so to be universal, I use only time on “hotspot” to select it. I was talking about the fact that sometimes the computer think I am in when I am out, and I have to do some code because the trigger In when I am in VR is a little bugged. In fact, when I am mooving over the “hotspot” if I print console.log I can see that the trigger in is first then out (when I am still in) then in etc…

After some test, it’s working when hotspots are near to the VR camera, but when they are a little more far so (we see them smaller) than before, with the vr there is some bugs. But near, it’s fixed.

How far? Can you update the playground to a point where you can repro it? Does it happen on the playground or only when you download and run locally?

Sorry I don’t have time to repo it, I have to move on my project for my company. But I can give you the position and the the size.

So I think it’s not a question of distance but about the ratio size/distance. Because more the hotspot is far, more it is seen “little”.

I will give you the position of my mesh (with advancedTexture.CreateForMesh) + size of my ellipse

  var planeLink = BABYLON.Mesh.CreatePlane("plane", 5);
 planeLink.position = new BABYLON.Vector3(-9.856177494195498, -7.575172191173865e-26, -11.002394108127689)
   var ellipse1 = new BABYLON.GUI.Ellipse();
    ellipse1.width = "200px";
    ellipse1.height = "200px";
    ellipse1.hoverCursor = "pointer"
    ellipse1.thickness = 0;

I have tried to set the thickness to different values, I have seen maybe so improvement but nothing that I can be satisfied.

And I have run it only locally I think.
Good Luck.