SamPotasz Posted February 16, 2015 Share Posted February 16, 2015 Hi all, Is it possible to disable clicking "through" a sprite? As in, if Blanket sprite covers up the Mattress button/sprite visually, is it possible to disable input for the Mattress? Is it best to check on each of Mattress' touch events that it's not covered up? That seems pretty messy, and I'm wondering if I'm missing something since clearly Phaser already knows which sprite is on top. Thanks,Sam Link to comment Share on other sites More sharing options...
rich Posted February 17, 2015 Share Posted February 17, 2015 InputHandler.priorityID allows you to control which Sprite takes priority when both receive a click. There's an example showing this in the input section. SamPotasz 1 Link to comment Share on other sites More sharing options...
SamPotasz Posted February 17, 2015 Author Share Posted February 17, 2015 Thanks, Rich! The solution for me was that my top sprite which I wanted to cover up input for the sprites below it was not inputEnabled. The example was very helpful. Link to comment Share on other sites More sharing options...
Recommended Posts