Normand Briere
2019-10-06 4cbc9cc2b4438dd9bb20095d2305be9150cc0071
CameraPane.java
....@@ -15002,6 +15002,9 @@
1500215002
1500315003 void GoDown(int mod)
1500415004 {
15005
+ LA.vecSub(manipCamera.location, manipCamera.lookAt, manipCamera.direction);
15006
+ float scale = (float)manipCamera.direction.length() / 10;
15007
+
1500515008 MODIFIERS |= COMMAND;
1500615009 boolean isVR = (mouseMode&VR)!=0;
1500715010 /**/
....@@ -15011,16 +15014,16 @@
1501115014 // manipCamera.RotateInterest(0, speed);
1501215015 // else
1501315016 if (isVR)
15014
- ViewAngle(-speed*delta);
15017
+ ViewAngle(-speed*delta*scale);
1501515018 else
15016
- manipCamera.Translate(0, -speed*delta, getWidth());
15019
+ manipCamera.Translate(0, -speed*delta*scale, getWidth());
1501715020 }
1501815021 else
1501915022 {
1502015023 if (isVR)
15021
- manipCamera.BackForth(0, -speed*delta, isVR?1000:0); // getWidth());
15024
+ manipCamera.BackForth(0, -speed*delta*scale, isVR?1000:0); // getWidth());
1502215025 else
15023
- manipCamera.RotatePosition(0, -speed);
15026
+ manipCamera.RotatePosition(0, -speed*scale);
1502415027 }
1502515028
1502615029 /**/
....@@ -15040,6 +15043,9 @@
1504015043
1504115044 void GoUp(int mod)
1504215045 {
15046
+ LA.vecSub(manipCamera.location, manipCamera.lookAt, manipCamera.direction);
15047
+ float scale = (float)manipCamera.direction.length() / 10;
15048
+
1504315049 RigidBody.justclicked = true;
1504415050
1504515051 MODIFIERS |= COMMAND;
....@@ -15052,14 +15058,14 @@
1505215058 // manipCamera.RotateInterest(0, -speed);
1505315059 // else
1505415060 if (isVR)
15055
- ViewAngle(speed*delta);
15061
+ ViewAngle(speed*delta*scale);
1505615062 else
15057
- manipCamera.Translate(0, speed*delta, getWidth());
15063
+ manipCamera.Translate(0, speed*delta*scale, getWidth());
1505815064 }
1505915065 else
1506015066 {
1506115067 if (isVR)
15062
- manipCamera.BackForth(0, speed*delta, isVR?1000:0); // getWidth());
15068
+ manipCamera.BackForth(0, speed*delta*scale, isVR?1000:0); // getWidth());
1506315069 else
1506415070 manipCamera.RotatePosition(0, speed);
1506515071 }
....@@ -15081,16 +15087,19 @@
1508115087
1508215088 void GoLeft(int mod)
1508315089 {
15090
+ LA.vecSub(manipCamera.location, manipCamera.lookAt, manipCamera.direction);
15091
+ float scale = (float)manipCamera.direction.length() / 10;
15092
+
1508415093 MODIFIERS |= COMMAND;
1508515094 /**/
1508615095 if((mod&SHIFT) == SHIFT)
15087
- manipCamera.Translate(speed, 0, getWidth());
15096
+ manipCamera.Translate(speed*scale, 0, getWidth());
1508815097 else
1508915098 {
1509015099 if ((mouseMode&VR)!=0)
15091
- manipCamera.RotateInterest(-speed*manipCamera.shaper_fovy/90, 0);
15100
+ manipCamera.RotateInterest(-speed*scale*manipCamera.shaper_fovy/90, 0);
1509215101 else
15093
- manipCamera.RotatePosition(speed*manipCamera.shaper_fovy/90, 0);
15102
+ manipCamera.RotatePosition(speed*scale*manipCamera.shaper_fovy/90, 0);
1509415103 }
1509515104
1509615105 /**/
....@@ -15113,16 +15122,19 @@
1511315122
1511415123 void GoRight(int mod)
1511515124 {
15125
+ LA.vecSub(manipCamera.location, manipCamera.lookAt, manipCamera.direction);
15126
+ float scale = (float)manipCamera.direction.length() / 10;
15127
+
1511615128 MODIFIERS |= COMMAND;
1511715129 /**/
1511815130 if((mod&SHIFT) == SHIFT)
15119
- manipCamera.Translate(-speed, 0, getWidth());
15131
+ manipCamera.Translate(-speed*scale, 0, getWidth());
1512015132 else
1512115133 {
1512215134 if ((mouseMode&VR)!=0)
15123
- manipCamera.RotateInterest(speed*manipCamera.shaper_fovy/90, 0);
15135
+ manipCamera.RotateInterest(speed*scale*manipCamera.shaper_fovy/90, 0);
1512415136 else
15125
- manipCamera.RotatePosition(-speed*manipCamera.shaper_fovy/90, 0);
15137
+ manipCamera.RotatePosition(-speed*scale*manipCamera.shaper_fovy/90, 0);
1512615138 }
1512715139
1512815140 /**/
....@@ -18275,7 +18287,7 @@
1827518287
1827618288 private boolean keepshadow;
1827718289
18278
- static public boolean capsLocked = false; // VR
18290
+ static public boolean capsLocked = true; // false; // VR
1827918291
1828018292 static public int indexcount = 0;
1828118293 /*static*/ cColor vertexOcclusion = new cColor();