Heya Mathieu. Um… I don’t have any VR gear… but I used the PG “goggles” button, anyway.
Have you noticed that… pointerEnter/Out… works ok, if you do it slowly? Seems that way, here.
PointerOut QUICKLY, and it seems to get stuck in “entered” (over).
I can do the same in NON-VR mode… by placing the button on left side of canvas… then pointerOut quickly to the left… onto the code-editor area. Button sticks in ‘entree’ mode THAT way, too.
Test #1: When you add
plane.showBoundingBox = true; in line 54 area, do you see improvement? I do… but still testing.
Test #2: When you make plane double-sized (10) in line 52, do you see improvements? I do.
There might be a “polling” time-interval for GUI. ie. HOW OFTEN does GUI check for Enter/Out? In VR mode, the “plane” is a very small area, and we might be pointer-outing SO FAST that… the “next check” is NOT over the plane anymore.
In other words, maybe GUI must do at least ONE Enter/Out check… while pointer is OUT-of button, but MUST still be OVER the plane. If we leave button and plane too quickly, GUI has no chance to “read” an “OUT from button but still OVER plane”. GUI system might NEED an “out from button, but still over plane” -check… to shut-off the button’s OVER (to set it to OUT state). Understand?
For ease of text typing, let’s abbreviate “Out Of Button, Over Plane”… as “oobop”
Comedy aside: Good song title? “Too Fast to Oobop!” heh
By making the plane bigger, or doing pointer-out more slowly, we give the GUI more time to see/sample an oobop state.
Conversely, by leaving the button (and plane) too quickly, GUI time-interval doesn’t have time to “see” (test for) oobop condition.
Just possibly, there is a way to speed-up the GUI pointer-event time intervals. Not sure.
I’m not sure if I am on the correct investigation track… but maybe. Perhaps you can do some tests… based-upon these “speed” thoughts… and see if you can verify things. Report discoveries, please. (You always do, and I’m glad - it helps us all learn things.)
Perhaps we/others can do some research - to see if we can learn about pointer-test time-intervals, and perhaps speed it up a bit, with no performance problems in your low-mesh-count scene/project. It MIGHT involve the speed of the observer/observable system… which the GUI system likely uses. And also, perhaps the scene.inputManager. Thinkin’.