Lawen Posted February 26, 2015 Share Posted February 26, 2015 Hi every one! I have a problem related with touching sprites with transparent pixels. How can I avoid trigger the inputDown event (or have some control inside) when I click on a transparent pixel of the sprite? Thanks a lot. Link to comment Share on other sites More sharing options...
rich Posted February 26, 2015 Share Posted February 26, 2015 sprite.input.pixelPerfectClick = true; horkoda and Lawen 2 Link to comment Share on other sites More sharing options...
Lawen Posted February 27, 2015 Author Share Posted February 27, 2015 Thanks a lot! Does it works also if the sprite is with alpha = 0 or visibility = false? I want to avoid trigger the event if the sprite has another sprite as a child but is not visible. Link to comment Share on other sites More sharing options...
rich Posted February 27, 2015 Share Posted February 27, 2015 It works based on the underlying texture of the sprite, not what is visible on-screen, so yes it'd still work even if the sprite alpha was zero. Lawen 1 Link to comment Share on other sites More sharing options...
Recommended Posts