create a rotation camera in processing
float camx = width / 2.0; float camy = height / 2.0; float camz = (height / 2.0) / tan(PI * 30.0 / 180.0); float camangle = 0; void setup() { size(640, 360, P3D); } void draw() { background(0); float camangle = map(mouseX, 0, width, 0, PI * 2); float camy = map(mouseY, 0, height, 200, 100); camera(camx, camy, camz, camx + cos(camangle), camy, camz + sin(camangle), 0, 1, 0); // Draw the box noStroke(); fill(255); box(50); }