Hi Reas
yep, I'm able to do a simple picking with screenX,Y,Z - by adding, for example, the lines
Code:
if (mouseX>screenX(-100,0,0)&&mouseX<screenX(100,0,0)&&mouseY>screenY(0,-100,0)&&mouseY<screenY(0,100,0)) { fill(255,0,0); }
else { fill (200); }
to replace the fill on the program above;
but this is not the good way - it evaluates a "center rectangular slice" of my geometry - when the geometry rotates, the slice remains the same. there's no Z info to it.
Besides, when I rotate the geometry around the screen, the screenX coordinates do not stick to the translated geometry very well - the mouse over action gets even worse aligned.
I guess my real question is: is there a general way to build an invisible "bounding box" around my geometry, and evaluate the bounding box for mouse picking?
if anyone do not have a code for this but can point me out to any other relevant example, I'll be already happy.
thanks!