We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi, Here I was trying to create a 3D box and top of that I was showing text so when I use peasycam it rotates and zooms everything in the sketch but don't want to transform and translate text other than box. help me !
I thought hint() would work but it doesn't.
import peasy.*;
PeasyCam cam;
void setup() {
size(200, 200, P3D);
cam = new PeasyCam(this, 100);
cam.setMinimumDistance(50);
cam.setMaximumDistance(500);
}
void draw() {
//rotateX(-.5);
//rotateY(-.5);
background(0);
pushMatrix();
hint(DISABLE_DEPTH_TEST);
fill(255, 0, 0);
box(30);
popMatrix();
hint(ENABLE_DEPTH_TEST);
fill(-1);
text("CENTER", width/2, height/2);
}
Answers
Use
cam.beginHUD();
and 'cam.endHUD()`.http://mrfeinberg.com/peasycam/reference/index.html
@clankill3r : Awesome :) Thank you so much
I am sharing this those who needs it