I'm creating something that uses Peasy to rotate the camera. The screen has some text that spins around and I need to make each text spot clickable. I have spent a few hours trying to figure this out, but I have no success. Does anyone have any ideas and can help me with this problem?
I know how to make a non-moving rect() clickable using an if-statement with mouseX and mouseY. But I don't know what to do if the rect() is rotating. Any suggestions are welcome. Using other libraries like controlP5 is okay with me too; I really need help getting this to work!
I've uploaded a .zip of the sketch if you want to
download it on dropbox, or you can view the code below:
import peasy.*;
PeasyCam cam;
PFont font;
PImage pim;
float rot=0;
ArrayList<String> aList = new ArrayList<String>();
void setup(){
size(800, 600, P3D);
//smooth();
hint(DISABLE_DEPTH_TEST); // avoids z-fighting
font = loadFont("Helvetica-50.vlw");
textFont(font);
cam = new PeasyCam(this, 400, 400, 0, 1500); // default settings on double click