From what I can tell there is no way to ignore touches on the transparent portion of a png. This is making development pretty tough. I've seen someone suggest making polygons and doing a point test against those but the overhead for that is unreasonable. Can we expect to see a better solution to this problem soon?
Comments
www.tntengine.com
If this is something that is vital to your app, then ideally you'd need to export any images you want to check as raw data (ie not compressed like .PNG's) so that you can create your own local "map" and then just pick up the individual element yourself.
You could probably make the process even easier by pre-processing the image down to an 8bit byte per pixel image before exporting it and then using a fixed value (usually 0) to represent an empty pixel in the image.
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
I have seen it in a couple of flash engines but that's software rendering.
This is why most "old skool" 2D game programmers would just use a bounding box that's slightly smaller than their sprite to give the "illusion" of a decent collision which in the vast majority of cases would be good enough and efficient enough to keep the frame rate up.
What's your specific need for this - maybe someone can suggest a different way to handle the problem?
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill