Normand Briere
2019-09-28 c3c47406ac43dafd51e6ad1d7b92a794bd69b7d6
Fix/patch click flicking.
4 files modified
39 ■■■■■ changed files
CameraPane.java 16 ●●●●● patch | view | raw | blame | history
GroupEditor.java 1 ●●●● patch | view | raw | blame | history
PhysicsNode.java 1 ●●●● patch | view | raw | blame | history
com/bulletphysics/dynamics/RigidBody.java 21 ●●●●● patch | view | raw | blame | history
CameraPane.java
....@@ -250,7 +250,7 @@
250250
251251 public javax.media.opengl.GL GetGL0()
252252 {
253
- return null;
253
+ return currentGL;
254254 }
255255
256256 public int GenList()
....@@ -10761,7 +10761,9 @@
1076110761 }
1076210762 /**/
1076310763
10764
- if (selection)
10764
+ boolean control = ((modifiers & CTRL) != 0);
10765
+
10766
+ if (selection && (!Globals.isLIVE() || control))
1076510767 {
1076610768 selectbuffer.display();
1076710769 return;
....@@ -14346,8 +14348,6 @@
1434614348
1434714349 public void mousePressed(MouseEvent e)
1434814350 {
14349
- RigidBody.justclicked = true;
14350
- System.out.println("justclicked: " + e);
1435114351 //System.out.println("mousePressed: " + e);
1435214352 clickStart(e.getX(), e.getY(), e.getModifiers(), e.getModifiersEx());
1435314353 }
....@@ -14655,7 +14655,7 @@
1465514655 boolean jump;
1465614656 boolean live;
1465714657
14658
- boolean mute;
14658
+ boolean mute = false;
1465914659
1466014660 // void JumpToTarget()
1466114661 // {
....@@ -15367,6 +15367,12 @@
1536715367
1536815368 public void mouseReleased(MouseEvent e)
1536915369 {
15370
+ if (isRenderer && !movingcamera)
15371
+ {
15372
+ RigidBody.justclicked = true;
15373
+ System.out.println("justclicked: " + e);
15374
+ }
15375
+
1537015376 Globals.MOUSEDRAGGED = false;
1537115377
1537215378 movingcamera = false;
GroupEditor.java
....@@ -2524,6 +2524,7 @@
25242524 // ragdoll.toParent[3][2] = -0.01;
25252525
25262526 makeSomething(ragdoll);
2527
+ group(new PhysicsNode());
25272528 //makeSomething(new VehicleDemo());
25282529 } else
25292530 /*
PhysicsNode.java
....@@ -80,6 +80,7 @@
8080 live = true;
8181
8282 gravity = 1;
83
+ wind = 1;
8384 }
8485
8586 void Reset()
com/bulletphysics/dynamics/RigidBody.java
....@@ -242,23 +242,26 @@
242242 // wind.y -= worldTransform.origin.y;
243243 // wind.z -= worldTransform.origin.z;
244244
245
-// this.collisionShape.getAabb(worldTransform, min, max);
246
-//
247
-// if (pos.x < min.x || pos.x > max.x)
248
-// return;
249
-// if (pos.y < min.y || pos.y > max.y)
250
-// return;
251
-// if (pos.z < min.z || pos.z > max.z)
252
-// return;
245
+ this.collisionShape.getAabb(worldTransform, min, max);
246
+
247
+ if (pos.x < min.x || pos.x > max.x)
248
+ return;
249
+ if (pos.y < min.y || pos.y > max.y)
250
+ return;
251
+ if (pos.z < min.z || pos.z > max.z)
252
+ return;
253253
254254 float dot = pos.x * wind.x + pos.y * wind.y + pos.z * wind.z;
255255
256
- dot = 10;
256
+ dot = 100;
257257
258258 w.x = wind.x * gravity.z * dot;
259259 w.y = wind.y * gravity.z * dot;
260260 w.z = wind.z * gravity.z * dot;
261261
262
+ System.out.print("min = " + min);
263
+ System.out.println("; max = " + max);
264
+
262265 applyCentralForce(w);
263266 }
264267