Is there any way to get the Sprite:hitTestPoint to be aware of the transparent areas of the image so the return value can be 'false' ? Currently, I can grab Sprites by their transparent areas, which looks kind of bad.
Currently no. I've added this to the requests list. (But per-pixel testing can be tricky because you should store one texture for GPU and one texture for CPU and this means twice as much memory consumption as before)
But there may be some workarounds such as representing the bitmap with a coarse polygon and doing a "point in polygon" test. I can post a point in polygon test code in Lua here.
Comments
M
http://www.sharksoupstudios.com
But there may be some workarounds such as representing the bitmap with a coarse polygon and doing a "point in polygon" test. I can post a point in polygon test code in Lua here.
sorry for the late reply. here is the function:
Best,
Likes: MoKaLux
Thanks for the info.
I'll try that some time.
Chip
Code for getting vertices:
And in case of rotating object: