From 02e145cb923d601395acc7f15ae9e13f85ef2fbb Mon Sep 17 00:00:00 2001 From: Normand Briere <nbriere@noware.ca> Date: Mon, 02 Jul 2018 21:38:58 -0400 Subject: [PATCH] Hip orientation. --- Camera.java | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Camera.java b/Camera.java index 27c2395..8454950 100644 --- a/Camera.java +++ b/Camera.java @@ -11,7 +11,7 @@ /*static*/ float DECAL = 12; // 3; /*static*/ float SCALE = 1; // 0.5f; - float shaper_fovy = 60.0f; + float shaper_fovy = 25.0f; float shaper_zNear = 0.01f; float shaper_zFar = 1E5f; // 500.0f; @@ -21,8 +21,8 @@ //<-2.2,0.7,-2> and pointed it at <-0.61,0.3,-0.6> // location = LA.newVector(2,0.7,-2); // lookAt = new cVector(0.6,0.3,-0.6); - location = LA.newVector(2,0.7,2); - lookAt = new cVector(0.0,0.3,0); + location = LA.newVector(3,2,2); + lookAt = new cVector(0.0,0.5,0); direction = new cVector(); toParent = LA.newMatrix(); fromParent = LA.newMatrix(); @@ -392,13 +392,15 @@ if (CameraPane.ROTATECAMERA) { double[][] rotate = { { 0,1,0,0 }, { -1,0,0,0}, { 0,0,1,0}, { 0,0,0,1 } }; - double[][] rotate_1 = { { 0,-1,0,0 }, { 1,0,0,0}, { 0,0,1,0}, { 0,0,0,1 } }; + //double[][] rotate_1 = { { 0,-1,0,0 }, { 1,0,0,0}, { 0,0,1,0}, { 0,0,0,1 } }; - LA.matConcat(rotate, fromScreen, fromScreen); - LA.matConcat(toScreen, rotate_1, toScreen); + LA.matConcat(fromScreen, rotate, fromScreen); + //LA.matConcat(toScreen, rotate_1, toScreen); } //if (this == CameraPane.lightCamera) //CameraPane.lighttouched = true; + + LA.matInvert(fromScreen, toScreen); } // void Draw(CameraPane display, Object3D /*Composite*/ root, boolean selected) -- Gitblit v1.6.2