Hi people; I’m starting using camera(…) and don’t understand well looking the reference or other topics
I want to change the camera but let some buttons/text in the front lane without moving (to be able to touch them) .
Also, the begincamera() and endCamera() don’t see are doing something… works the same with it and without…
well, this is an example about what I would like, and what I have:
float circleX;
int flag;
void setup(){
size(displayWidth,displayHeight,P3D);
circleX = 50;
}
void draw(){
background(50);
fill(255);
text("hello",100,100);
ellipse(100,180,24,24);
camera(mouseX, mouseY, (float)(height/2.0) / tan((float) (PI*30.0 / 180.0)),
(float)(width/2.0), (float)(height/2.0), 0, 0, 1, 0);
translate(circleX,500);
sphere(100);
if(circleX >= displayWidth-24){
flag=1;
}
if(circleX <= 24){
flag=0;
}
if(flag==1)
circleX = circleX-1;
else
circleX = circleX+1;
}
Want the text and the ellipse, to stay static in the same position (like if the ellipse would be a button) . Like an HUD.
Thanks, any help would be appreciated .