From 02762141d043f69c51cbd8d66ae1e1797662bf6e Mon Sep 17 00:00:00 2001 From: Simon Date: Wed, 16 Jan 2019 01:33:30 +0100 Subject: [PATCH] Fix wrong possitionining and remove 2D Text --- VMC_Processing_Step3.pde | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/VMC_Processing_Step3.pde b/VMC_Processing_Step3.pde index 0df31da..4f28dbd 100644 --- a/VMC_Processing_Step3.pde +++ b/VMC_Processing_Step3.pde @@ -33,9 +33,8 @@ void draw() { background(0xff000000); - pushMatrix(); - scale(5); - translate(0.0, 0.0, -150.0); + scale(10); + translate(60.0, 70.0, -150.0); lightSpecular(64, 64, 64); // Horizonal light. @@ -56,25 +55,8 @@ void draw() roll += rotationY; yaw += rotationZ; - buddha.rotateX(pitch); - buddha.rotateY(-roll); - buddha.rotateZ(yaw); - - popMatrix(); - this.setMatrix(baseMat); - ambientLight(255, 255, 255); - - fill(255); - textSize(fontSize * .5); - text( - "pitch: " + nfp(pitch * 100, 1, 1) + - " | roll: " + nfp(roll * 100, 1, 1) + - " | yaw: " + nfp(yaw * 100, 1, 1), - 0, fontSize*7.5, width, height - ); - text("Tap screen to reset orientation", 0, fontSize*8.1, width, height); - textSize(fontSize); - text("fps: " + round(frameRate), 0, fontSize*9, width, height); + buddha.rotateY(pitch); + buddha.rotateX(-roll); } void onGyroscopeEvent(float x, float y, float z)