alarian Posted November 17, 2015 Share Posted November 17, 2015 Hello! I'm now bald because for the past 2 days I've been trying to figure out how to do a pixelperfect click on a png with transparency.I'm bald because I'm freaking out and now I'm sick of pulling my hair out! I quickly found sprite.input.pixelPerfectOver = true; Yay. Now it disregards the transparent area when figuring out if the mouse is over the sprite. However, clicking the transparent area still registers? And the function I have for .onInputOver is also fired then... Please help :'( Link to comment Share on other sites More sharing options...
rich Posted November 17, 2015 Share Posted November 17, 2015 There's no such property as 'pixelPerfectDown'. There is sprite.input.pixelPerfectOver and sprite.input.pixelPerfectClick - both of which are false by default. There is also pixelPerfectAlpha to let you control the alpha tolerance. How does your code differ to one of the examples like http://phaser.io/examples/v2/input/pixelpick-atlas ? alarian 1 Link to comment Share on other sites More sharing options...
alarian Posted November 18, 2015 Author Share Posted November 18, 2015 Thank you so much!I missed that example.Only watched the one with the rotating bunny! You really helped me here. Thank you! Link to comment Share on other sites More sharing options...
Recommended Posts