VRHelper.onExitingVR not working on mobile Chrome


i have an old project which was running with the VRExperienceHelper.
I think the VRHelper is using the WebXR API for VR now. And while testing i found out that it can detact that im entering VR but not that i exiting VR. I tried to updated to WebXR. But WebXR gaze and interaction is still instable and i can’t use meshSelectionPredicate with WebXR.
I only tested on Chrome and firefox. Firefox is running perfectly but chrome doesnt work

Simple VR Scene to show that vrHelper.onExitingVR not detected in Chrome:


Does anyone have some advice :smiley:

I’ll look into that, but I’m more interested to know why you think the WebXR gaze api is not stable.

The gaze pointer selection is using pointer events to control the scene as if you had a mouse or a touch event. The predicates are the same predicates used with pointers.

BTW, a quick fix would be to use the XR session’s onXRSessionEnd observable, which you can get if the .xr object exists in the VR helper.

I was just browsing throw the API and had a quick look at gaze tracking and there were standing that this part is instable

Could be that i missread

I will try what you suggested thank you :slight_smile:

Oh, I see :slight_smile:

Well, nothing is stable in WebXR, but WebVR is deprecated (and completely removed in chrome).
Our gaze pointer-selection feature is working (tested with GearVR), you can give it a go.

hii sorry i couldn, get it to work or find what you suggested

i tried many things and ended with

“xrHelper.pointerSelection.raySelectionPredicate = (mesh) => {”

but the function returns every mesh in the scene and not the one im looking at,

my only control is the gaze and im working on mobile with cardboard
i need a kind of prediction which detects the mesh which is looked at. While looking at the mesh it starts a counter. When you look at the mesh for like 3 sec than an event is triggered
it was working with the vhelper but i cant figur it out

please help mee :sweat_smile:

I see what you need. The gaze support in XR requires (at the moment) user interaction (some form of a click) to select a mesh. I can add the three-seconds-select if it’s needed. There is an open issue on GitHub to improve the pointer select feature, comment there and I’ll take care of it when I’ll work on extending the feature.

would be really nice if you could do that how is the issue called or should i open a new on ?

You can open a new one or comment on this: