.. | .. |
---|
15002 | 15002 | |
---|
15003 | 15003 | void GoDown(int mod) |
---|
15004 | 15004 | { |
---|
| 15005 | + LA.vecSub(manipCamera.location, manipCamera.lookAt, manipCamera.direction); |
---|
| 15006 | + float scale = (float)manipCamera.direction.length() / 10; |
---|
| 15007 | + |
---|
15005 | 15008 | MODIFIERS |= COMMAND; |
---|
15006 | 15009 | boolean isVR = (mouseMode&VR)!=0; |
---|
15007 | 15010 | /**/ |
---|
.. | .. |
---|
15011 | 15014 | // manipCamera.RotateInterest(0, speed); |
---|
15012 | 15015 | // else |
---|
15013 | 15016 | if (isVR) |
---|
15014 | | - ViewAngle(-speed*delta); |
---|
| 15017 | + ViewAngle(-speed*delta*scale); |
---|
15015 | 15018 | else |
---|
15016 | | - manipCamera.Translate(0, -speed*delta, getWidth()); |
---|
| 15019 | + manipCamera.Translate(0, -speed*delta*scale, getWidth()); |
---|
15017 | 15020 | } |
---|
15018 | 15021 | else |
---|
15019 | 15022 | { |
---|
15020 | 15023 | if (isVR) |
---|
15021 | | - manipCamera.BackForth(0, -speed*delta, isVR?1000:0); // getWidth()); |
---|
| 15024 | + manipCamera.BackForth(0, -speed*delta*scale, isVR?1000:0); // getWidth()); |
---|
15022 | 15025 | else |
---|
15023 | | - manipCamera.RotatePosition(0, -speed); |
---|
| 15026 | + manipCamera.RotatePosition(0, -speed*scale); |
---|
15024 | 15027 | } |
---|
15025 | 15028 | |
---|
15026 | 15029 | /**/ |
---|
.. | .. |
---|
15040 | 15043 | |
---|
15041 | 15044 | void GoUp(int mod) |
---|
15042 | 15045 | { |
---|
| 15046 | + LA.vecSub(manipCamera.location, manipCamera.lookAt, manipCamera.direction); |
---|
| 15047 | + float scale = (float)manipCamera.direction.length() / 10; |
---|
| 15048 | + |
---|
15043 | 15049 | RigidBody.justclicked = true; |
---|
15044 | 15050 | |
---|
15045 | 15051 | MODIFIERS |= COMMAND; |
---|
.. | .. |
---|
15052 | 15058 | // manipCamera.RotateInterest(0, -speed); |
---|
15053 | 15059 | // else |
---|
15054 | 15060 | if (isVR) |
---|
15055 | | - ViewAngle(speed*delta); |
---|
| 15061 | + ViewAngle(speed*delta*scale); |
---|
15056 | 15062 | else |
---|
15057 | | - manipCamera.Translate(0, speed*delta, getWidth()); |
---|
| 15063 | + manipCamera.Translate(0, speed*delta*scale, getWidth()); |
---|
15058 | 15064 | } |
---|
15059 | 15065 | else |
---|
15060 | 15066 | { |
---|
15061 | 15067 | if (isVR) |
---|
15062 | | - manipCamera.BackForth(0, speed*delta, isVR?1000:0); // getWidth()); |
---|
| 15068 | + manipCamera.BackForth(0, speed*delta*scale, isVR?1000:0); // getWidth()); |
---|
15063 | 15069 | else |
---|
15064 | 15070 | manipCamera.RotatePosition(0, speed); |
---|
15065 | 15071 | } |
---|
.. | .. |
---|
15081 | 15087 | |
---|
15082 | 15088 | void GoLeft(int mod) |
---|
15083 | 15089 | { |
---|
| 15090 | + LA.vecSub(manipCamera.location, manipCamera.lookAt, manipCamera.direction); |
---|
| 15091 | + float scale = (float)manipCamera.direction.length() / 10; |
---|
| 15092 | + |
---|
15084 | 15093 | MODIFIERS |= COMMAND; |
---|
15085 | 15094 | /**/ |
---|
15086 | 15095 | if((mod&SHIFT) == SHIFT) |
---|
15087 | | - manipCamera.Translate(speed, 0, getWidth()); |
---|
| 15096 | + manipCamera.Translate(speed*scale, 0, getWidth()); |
---|
15088 | 15097 | else |
---|
15089 | 15098 | { |
---|
15090 | 15099 | if ((mouseMode&VR)!=0) |
---|
15091 | | - manipCamera.RotateInterest(-speed*manipCamera.shaper_fovy/90, 0); |
---|
| 15100 | + manipCamera.RotateInterest(-speed*scale*manipCamera.shaper_fovy/90, 0); |
---|
15092 | 15101 | else |
---|
15093 | | - manipCamera.RotatePosition(speed*manipCamera.shaper_fovy/90, 0); |
---|
| 15102 | + manipCamera.RotatePosition(speed*scale*manipCamera.shaper_fovy/90, 0); |
---|
15094 | 15103 | } |
---|
15095 | 15104 | |
---|
15096 | 15105 | /**/ |
---|
.. | .. |
---|
15113 | 15122 | |
---|
15114 | 15123 | void GoRight(int mod) |
---|
15115 | 15124 | { |
---|
| 15125 | + LA.vecSub(manipCamera.location, manipCamera.lookAt, manipCamera.direction); |
---|
| 15126 | + float scale = (float)manipCamera.direction.length() / 10; |
---|
| 15127 | + |
---|
15116 | 15128 | MODIFIERS |= COMMAND; |
---|
15117 | 15129 | /**/ |
---|
15118 | 15130 | if((mod&SHIFT) == SHIFT) |
---|
15119 | | - manipCamera.Translate(-speed, 0, getWidth()); |
---|
| 15131 | + manipCamera.Translate(-speed*scale, 0, getWidth()); |
---|
15120 | 15132 | else |
---|
15121 | 15133 | { |
---|
15122 | 15134 | if ((mouseMode&VR)!=0) |
---|
15123 | | - manipCamera.RotateInterest(speed*manipCamera.shaper_fovy/90, 0); |
---|
| 15135 | + manipCamera.RotateInterest(speed*scale*manipCamera.shaper_fovy/90, 0); |
---|
15124 | 15136 | else |
---|
15125 | | - manipCamera.RotatePosition(-speed*manipCamera.shaper_fovy/90, 0); |
---|
| 15137 | + manipCamera.RotatePosition(-speed*scale*manipCamera.shaper_fovy/90, 0); |
---|
15126 | 15138 | } |
---|
15127 | 15139 | |
---|
15128 | 15140 | /**/ |
---|
.. | .. |
---|
18275 | 18287 | |
---|
18276 | 18288 | private boolean keepshadow; |
---|
18277 | 18289 | |
---|
18278 | | - static public boolean capsLocked = false; // VR |
---|
| 18290 | + static public boolean capsLocked = true; // false; // VR |
---|
18279 | 18291 | |
---|
18280 | 18292 | static public int indexcount = 0; |
---|
18281 | 18293 | /*static*/ cColor vertexOcclusion = new cColor(); |
---|