I recently asked a question, where I figured out how to use this.input.setGlobalTopOnly and it worked. However, after not doing much for a few days, changing nothing, all of a sudden it doesn’t work anymore. Nothing is setting it to false.
What scenario do you get? AFAIK, when the 2 gameObject that stack with pre call .setInteractive() first, the most top event will be fired.
But when it comes across the scene, you need to rearrange the scene first, like bringToTop()
I’m using bringToTop(). I made this post right before I gave up on this project, and since this issue has already been solved we don’t need to do it again. Thanks for trying though.
Again, I don’t think this question needs to be answered as it was answered in the post I linked to at the top. Any moderator can delete this as it’s not very useful.
Hi,
If I’m not mistaken, the code is based in this: https://labs.phaser.io/view.html?src=src/scenes/drag%20scenes%20demo.js&v=3.22.0
The problem in this case is that the scenes are not interactive objects. Interactive Zone objects have been used instead to receive input.
In the drag event, the scene is brought to the front but the “zindex” of its corresponding Zone object is not modified.
The zIndex shouldn’t matter with setGlobalTopOnly, as that has to do with scenes, not zones. Again, this basically exact same conversation happened in the linked post so this question does not need to be answered.