Hi there,
in my application i’ve a GUI with a grid inside a ScrollViewer that can overlap some meshes.
These meshes are pickable and can react to mouse move events. When i show the GUI i don’t want that the user could interact with meshes, so i set isPointerBlocker = true
on all the GUI elements, and generally it works…till now I found that if the user moves the scroll bar the PointerOver
event is triggered anyway by the mesh. Is it a bug or am i forgetting something?
This is a PG to repro the issue: https://playground.babylonjs.com/#XNY77K#3
The sphere changes the colour when mouse is over, and with no GUI that overlaps. But if you move the sliding bar, the PointerOver
event is not blocked.
Hello! Apologies for this not having been answered, sometimes things slip by us I’m not sure about the pointerBlocker behavior (@DarraghBurke will be more qualified to know if this is expected or not), but I thought about an alternative solution without it, you could set the mesh isPickable property as false when the pointer enters a control, and to true when the pointer leaves: Test scrollbar and pointerblock | Babylon.js Playground (babylonjs.com)
Hey, so sorry about the delay in getting back to you! I missed the original ping on the forum.
Here is a PR to resolve this issue: [GUI] Block pointer events to scene when pointer is captured by darraghjburke · Pull Request #12400 · BabylonJS/Babylon.js (github.com)
What it will do is block pointer events from being passed to the scene when the pointer is captured (for example, if you’re dragging on a scrollviewer or slider).
Thank you, don’t worry for the delay it’s not a problem. I needed only confirmation that was a bug