Hi,
We want to click through some controls in our worldspace UI. To do this, we need to manually do a scene.multiPick() and check if it’s UI. This all works fine, but for this to really work, we need to set the isHitTestVisible property on multiple controls including the root control. This currently causes issues with the onPointerOutObservable not being called properly.
This playground might explain the situation more clearly: Babylon.js Playground
When you start hovering over the button, it becomes red. When you hover exit, it should become black.
It seems to me that when nothing has been hit in the _doPicking, it doesn’t call the onPointerOutObservable of the last control.
There’s already some code that should handle this case: Babylon.js/packages/dev/gui/src/2D/advancedDynamicTexture.ts at master · BabylonJS/Babylon.js · GitHub
but it’s being cancelled out by the target === this check in Babylon.js/packages/dev/gui/src/2D/controls/control.ts at master · BabylonJS/Babylon.js · GitHub
When I add true as the third argument to the _onPointerOut call, it works as I’d expect.