This addon uses unique color values for each interactive shape and draws them into an FBO. By using input coordinates of ( x , y ) it is then easy to correlate which item you want to interact with. Works well on UI and Objects that are scale or rotated
README
Created by Ben McChesney
Feel free to use this addon however you see fit commercially or otherwise. I'd prefer if you open sourced it or at least let me know if it's useful to anyone else :D
This is a small addon used to draw shapes into a single FBO and then compares hex values from that FBO to interactive objects.
Examples
HitTest2D
Feel free to use this addon however you see fit commercially or otherwise. I'd prefer if you open sourced it or at least let me know if it's useful to anyone else :D
This is a small addon used to draw shapes into a single FBO and then compares hex values from that FBO to interactive objects.
Examples
HitTest2D
- Simple rectangle shapes that respond to Mouse OVER , OUT and CLICK
ofxAddons