egeres Posted January 3, 2018 Share Posted January 3, 2018 Hi ! I'm trying to create simple clickable objects in phaser 3 but using the alpha channel to exclude part of the surface from being clickable. So far I've come up with this code : [PASTEBIN] which you can test in the phaser sandbox : http://labs.phaser.io/edit.html The problem is that the image turns red even when the mouse is over parts that have alpha channel, that shouldn't happen with that code : / Link to comment Share on other sites More sharing options...
rich Posted January 3, 2018 Share Posted January 3, 2018 None of those properties exist in 3.0 yet (which is why it doesn't do anything) Link to comment Share on other sites More sharing options...
egeres Posted January 3, 2018 Author Share Posted January 3, 2018 Oh thanks ! I saw them in this file and I thought they were functional : https://github.com/photonstorm/phaser/blob/master/v3/merge/input/InputHandler.js An alternative to solve the problem could be using a polygon like in this example : http://labs.phaser.io/view.html?src=src\input\mouse\polygon hit area.js Link to comment Share on other sites More sharing options...
rich Posted January 3, 2018 Share Posted January 3, 2018 Yeah ignore the merge folder, it's almost a year out of date! The current source is in the v3 folder. We will be adding pixel perfect detection back in for sure, it's just not there yet. Link to comment Share on other sites More sharing options...
Recommended Posts