In this playground, I should be able to click on the button and have the color change back and forth. However, it only works once per “run” of the playground. What’s going on? If I swap tabs back and forth and click again, the console logs the pointerdown event, but no color changes. Is this expected behavior? How can I get the button color to swap each click?
@iblis it works with Ellipse container only if isPointerBlocker = true
I wasn’t aware of this myself, but it seems the reason for this is documented here.
By default containers do not block pointer events (ie. the underlying scene will receive the pointer event even if the pointer is over a container). You can prevent this behavior by calling container.isPointerBlocker = true .
Son observables en la documentación esta explicado como funcionan.
They are observable in the documentation is explained how they work. https://doc.babylonjs.com/how_to/observables
Seemms to be the solution. I actually saw this but I thought it meant the opposite.
Interestingly enough if you enter Chrome console and toggle device toolbar everything works fine in that view, without needing to change isPointerBlocker to true.