Image Collision

BlitzMax Forums/BlitzMax Beginners Area/Image Collision

TwoCorin517(Posted 2008) [#1]
I'm sure this is pretty simple, when you have an image collision does it also include the alpha pixels?

Like if I have an image that's on top of the player, but the inside is (0,0,0) and that's the masked color, does ImagesCollide register it?


tonyg(Posted 2008) [#2]
It doesn't use alpha or mask in the collision test. A quick test suggests it causes a bit of slowdown though if you have an image within a hole of another and you're checking collisions.


TwoCorin517(Posted 2008) [#3]
so it records the collision then?


tonyg(Posted 2008) [#4]
No. Sorry I can see how it is poorly worded. Alpha and mask pixels are not included in the collision test. I think the performance issue is because a rect collision is performed first (I think).
Anyway, it should be simple to test using :