1
0
Fork 0

Fix wrong possitionining and remove 2D Text

This commit is contained in:
Simon Giesel 2019-01-16 01:33:30 +01:00
parent eb8a6c9a92
commit 02762141d0

View file

@ -33,9 +33,8 @@ void draw()
{ {
background(0xff000000); background(0xff000000);
pushMatrix(); scale(10);
scale(5); translate(60.0, 70.0, -150.0);
translate(0.0, 0.0, -150.0);
lightSpecular(64, 64, 64); lightSpecular(64, 64, 64);
// Horizonal light. // Horizonal light.
@ -56,25 +55,8 @@ void draw()
roll += rotationY; roll += rotationY;
yaw += rotationZ; yaw += rotationZ;
buddha.rotateX(pitch); buddha.rotateY(pitch);
buddha.rotateY(-roll); buddha.rotateX(-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);
} }
void onGyroscopeEvent(float x, float y, float z) void onGyroscopeEvent(float x, float y, float z)