Hi!
I'm having a little problem trying to see if the mouse is over an image. The image is a PNG with alpha and I'd like pixel collisions (bounding box kind of defeats the purpose of the transparent PNG).
What I used is a 1x1 image placed at the mouse cursor and check collisions between that and the transparent image. This works just fine when I'm at 100% scale and upwards, but if I scale things down, there's no more collision detected.
While writing this post, I just thought that maybe that 1x1 image gets scaled to 0x0 or something and therefore no collision.
Is there any better way to detect those collisions, or should I try to keep that image at 1x1 scale at all times?
I'm having a little problem trying to see if the mouse is over an image. The image is a PNG with alpha and I'd like pixel collisions (bounding box kind of defeats the purpose of the transparent PNG).
What I used is a 1x1 image placed at the mouse cursor and check collisions between that and the transparent image. This works just fine when I'm at 100% scale and upwards, but if I scale things down, there's no more collision detected.
While writing this post, I just thought that maybe that 1x1 image gets scaled to 0x0 or something and therefore no collision.
Is there any better way to detect those collisions, or should I try to keep that image at 1x1 scale at all times?