Normand Briere
2019-10-06 819ec23837b9c864343786091f7ee91393931231
jump 2 target
1 files modified
27 ■■■■■ changed files
CameraPane.java 27 ●●●●● patch | view | raw | blame | history
CameraPane.java
....@@ -193,6 +193,18 @@
193193
194194 private File defaultDirectory = javax.swing.filechooser.FileSystemView.getFileSystemView().getDefaultDirectory();
195195
196
+ public void Jump2Target()
197
+ {
198
+ if (manipCamera.hAspect == 0)
199
+ {
200
+ tmp.set(targetLookAt);
201
+ tmp.sub(manipCamera.lookAt);
202
+ manipCamera.lookAt.add(tmp);
203
+ manipCamera.location.add(tmp);
204
+ manipCamera.computeTransform();
205
+ }
206
+ }
207
+
196208 public com.sun.opengl.util.texture.Texture LoadSkybox(String name, String ext, boolean mipmap) throws GLException
197209 {
198210 try
....@@ -14415,14 +14427,9 @@
1441514427 int ay = anchorY;
1441614428 MODIFIERS &= ~COMMAND;
1441714429 mouseMode = 0; // autorepeat
14418
- tmp.set(targetLookAt);
14419
- tmp.sub(manipCamera.lookAt);
14420
- if (manipCamera.hAspect == 0)
14421
- {
14422
- manipCamera.lookAt.add(tmp);
14423
- manipCamera.location.add(tmp);
14424
- manipCamera.computeTransform();
14425
- }
14430
+
14431
+ Jump2Target();
14432
+
1442614433 // int mode = WHEEL;
1442714434 // if (e.metaDown())
1442814435 // {
....@@ -14538,6 +14545,8 @@
1453814545 {
1453914546 if (!wasliveok)
1454014547 return;
14548
+
14549
+ Jump2Target();
1454114550
1454214551 AAtimer.restart(); //
1454314552 Globals.TIMERRUNNING = true;
....@@ -15069,7 +15078,7 @@
1506915078 if (isVR)
1507015079 manipCamera.BackForth(0, speed*delta*scale, isVR?1000:0); // getWidth());
1507115080 else
15072
- manipCamera.RotatePosition(0, speed);
15081
+ manipCamera.RotatePosition(0, speed*scale);
1507315082 }
1507415083
1507515084 /**/