So my game requires no collision or physics... to simply put it, when I add touch eventlisteners (mouseDown, mouseUp, mouseMove) to sprites, I want the eventlisteners to only register the actual shown texture and not the transparent white space etc.
Example of a specific scenario I am trying to accomplish:
Ok I have one circle sprite with a transparent hole in the middle so you can see sprites behind the circle from the center.
Now put a solid square sprite behind the circle sprite (both contain touch eventlisteners), but when I want to grab the square sprite that is behind the circle sprite, I grab the circle sprite because of the transparent white space in the center that is still registered from the touch event.
I see shape editor and texture pack with trim options but not sure if that is going to solve my problem.
Comments
mmm ...
you should ignore circle collision and then check if there is a collision with square sprite?
if you need a more precise (and fast) collision detection you should use TNT Collision Engine. (it's free)
www.tntengine.com
edit:
i mean you can check with tntcollision if your internal circle (hole) is in collision with x,y (on event touch) if so (you are touching the internal transparent zone of your circle sprite) you can check if you are in collision also with square sprite...
should work...
www.tntengine.com
Ultimately I am trying to grab the square sprite behind the circle without having to move the circle sprite out of the way.