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);
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)