From 4cbc9cc2b4438dd9bb20095d2305be9150cc0071 Mon Sep 17 00:00:00 2001 From: Normand Briere <nbriere@noware.ca> Date: Sun, 06 Oct 2019 10:25:43 -0400 Subject: [PATCH] Count slider --- CameraPane.java | 40 ++++++++++++++++++++++++++-------------- 1 files changed, 26 insertions(+), 14 deletions(-) diff --git a/CameraPane.java b/CameraPane.java index 3f97ee4..c7a4b69 100644 --- a/CameraPane.java +++ b/CameraPane.java @@ -15002,6 +15002,9 @@ void GoDown(int mod) { + LA.vecSub(manipCamera.location, manipCamera.lookAt, manipCamera.direction); + float scale = (float)manipCamera.direction.length() / 10; + MODIFIERS |= COMMAND; boolean isVR = (mouseMode&VR)!=0; /**/ @@ -15011,16 +15014,16 @@ // manipCamera.RotateInterest(0, speed); // else if (isVR) - ViewAngle(-speed*delta); + ViewAngle(-speed*delta*scale); else - manipCamera.Translate(0, -speed*delta, getWidth()); + manipCamera.Translate(0, -speed*delta*scale, getWidth()); } else { if (isVR) - manipCamera.BackForth(0, -speed*delta, isVR?1000:0); // getWidth()); + manipCamera.BackForth(0, -speed*delta*scale, isVR?1000:0); // getWidth()); else - manipCamera.RotatePosition(0, -speed); + manipCamera.RotatePosition(0, -speed*scale); } /**/ @@ -15040,6 +15043,9 @@ void GoUp(int mod) { + LA.vecSub(manipCamera.location, manipCamera.lookAt, manipCamera.direction); + float scale = (float)manipCamera.direction.length() / 10; + RigidBody.justclicked = true; MODIFIERS |= COMMAND; @@ -15052,14 +15058,14 @@ // manipCamera.RotateInterest(0, -speed); // else if (isVR) - ViewAngle(speed*delta); + ViewAngle(speed*delta*scale); else - manipCamera.Translate(0, speed*delta, getWidth()); + manipCamera.Translate(0, speed*delta*scale, getWidth()); } else { if (isVR) - manipCamera.BackForth(0, speed*delta, isVR?1000:0); // getWidth()); + manipCamera.BackForth(0, speed*delta*scale, isVR?1000:0); // getWidth()); else manipCamera.RotatePosition(0, speed); } @@ -15081,16 +15087,19 @@ void GoLeft(int mod) { + LA.vecSub(manipCamera.location, manipCamera.lookAt, manipCamera.direction); + float scale = (float)manipCamera.direction.length() / 10; + MODIFIERS |= COMMAND; /**/ if((mod&SHIFT) == SHIFT) - manipCamera.Translate(speed, 0, getWidth()); + manipCamera.Translate(speed*scale, 0, getWidth()); else { if ((mouseMode&VR)!=0) - manipCamera.RotateInterest(-speed*manipCamera.shaper_fovy/90, 0); + manipCamera.RotateInterest(-speed*scale*manipCamera.shaper_fovy/90, 0); else - manipCamera.RotatePosition(speed*manipCamera.shaper_fovy/90, 0); + manipCamera.RotatePosition(speed*scale*manipCamera.shaper_fovy/90, 0); } /**/ @@ -15113,16 +15122,19 @@ void GoRight(int mod) { + LA.vecSub(manipCamera.location, manipCamera.lookAt, manipCamera.direction); + float scale = (float)manipCamera.direction.length() / 10; + MODIFIERS |= COMMAND; /**/ if((mod&SHIFT) == SHIFT) - manipCamera.Translate(-speed, 0, getWidth()); + manipCamera.Translate(-speed*scale, 0, getWidth()); else { if ((mouseMode&VR)!=0) - manipCamera.RotateInterest(speed*manipCamera.shaper_fovy/90, 0); + manipCamera.RotateInterest(speed*scale*manipCamera.shaper_fovy/90, 0); else - manipCamera.RotatePosition(-speed*manipCamera.shaper_fovy/90, 0); + manipCamera.RotatePosition(-speed*scale*manipCamera.shaper_fovy/90, 0); } /**/ @@ -18275,7 +18287,7 @@ private boolean keepshadow; - static public boolean capsLocked = false; // VR + static public boolean capsLocked = true; // false; // VR static public int indexcount = 0; /*static*/ cColor vertexOcclusion = new cColor(); -- Gitblit v1.6.2