I need to detect touch in a masked sprite not(rectangle masked but alpha mask)

61 Views Asked by At

when I want to detect touch in a masked (alpha mask) part of a sprite it just prints "a" if I touch a bounding rectangle around the sprite but not only the masked part. in the game that I want write the user moves it's finger without touching any sprite(obstacle) but when I write the code it just prints "a"(means loose) when the user touches a rectangle masked part of the sprite which I don't want what I basically want is to detect touch only I the masked area of the sprite but not the full rectangle surrounding the sprite. I need to detect touch in a sprite masked like this:

but not this:

0

There are 0 best solutions below