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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

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