jjwallace Posted March 26, 2016 Share Posted March 26, 2016 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 More sharing options...
Fatalist Posted March 26, 2016 Share Posted March 26, 2016 If it's just a circle, it would be simpler with the Pythagorean equation. Link to comment Share on other sites More sharing options...
Recommended Posts