Reputation: 104
I'm making a game where I'm using sprites.Here I can move and rotate sprite. I can rotate sprite by touching that one time.But when I touch on transparent area of the sprite it also rotates. So Is there any method that while on touch event I can get that which part was being touched transparent or non-transparent? Any suggestions or help?
Upvotes: 1
Views: 213
Reputation: 765
You have a few options:
make the sprite smaller so that the alpha part won't even make a difference (assuming the alpha part is relatively small)
store some indicator of where the alpha part is in relation to the sprites origin... this would probably be difficult and an approximation (and would be hard if there are multiple alpha sections)
Upvotes: 1