Jump to content

CHALLENGE! Detecting pixel perfect pointer alpha of bitmap???


jjwallace
 Share

Recommended Posts

I have a challenge, maybe someone has already done it.

Say you have a bunch of game elements that are clickable on a screen.

You have a png on top of them, there is a circle in the png and the elements are moving around in the circle.

You want to click on the elements inside the clear alpha circle but not when they are hidden behind the PNG's non alpha sections.

How would you guys do this?  Would you take the x y of the pointer and detect alpha of the foreground PNG?

Or would you do a trig equattion? What if you want it to be responsive, maybe doing bitmap pixel detection is best?

What are you thoughts ?

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...