From 57c5b6cd8d12ffdaa3e0b099451e3c031012750a Mon Sep 17 00:00:00 2001
From: Normand Briere <nbriere@noware.ca>
Date: Thu, 03 Oct 2019 20:34:32 -0400
Subject: [PATCH] Fix lighttouched

---
 CameraPane.java |   21 +++++++++++++++------
 1 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/CameraPane.java b/CameraPane.java
index d075633..b60cf14 100644
--- a/CameraPane.java
+++ b/CameraPane.java
@@ -124,7 +124,7 @@
 static    boolean LOCALTRANSFORM = false;
 static    boolean FULLSCREEN = false;
 static    boolean SUPPORT = true;
-static    boolean INERTIA = true;
+static    boolean INERTIA = false; // true;
 static    boolean FAST = false;
 static    boolean SLOWPOSE = false;
 static    boolean FOOTCONTACT = true;
@@ -1530,7 +1530,7 @@
                 }
             }
             float b = 0;
-            if (obj.support != null && obj.link2master)
+            if (obj.support != null && obj.Link2Support())
             {
                 b = 1;
             }
@@ -14676,9 +14676,16 @@
             RigidBody.pos.z = 0;
             if (RigidBody.justclicked)
             {
-                RigidBody.pos.x = (float)manipCamera.lookAt.x;
-                RigidBody.pos.y = (float)manipCamera.lookAt.y;
-                RigidBody.pos.z = (float)manipCamera.lookAt.z;
+//                RigidBody.pos.x = (float)manipCamera.lookAt.x;
+//                RigidBody.pos.y = (float)manipCamera.lookAt.y;
+//                RigidBody.pos.z = (float)manipCamera.lookAt.z;
+                                 //       System.err.println("selected point = " + Trunk(selectedpoint.toParent[3][0]) + " " + Trunk(selectedpoint.toParent[3][1]) + " " + Trunk(selectedpoint.toParent[3][2]));
+                CreateSelectedPoint();
+                
+                RigidBody.pos.x = (float)selectedpoint.toParent[3][0];
+                RigidBody.pos.y = (float)selectedpoint.toParent[3][1];
+                RigidBody.pos.z = (float)selectedpoint.toParent[3][2];
+
                 RigidBody.wind.set(RigidBody.pos);
                 RigidBody.wind.x -= (float)manipCamera.location.x;
                 RigidBody.wind.y -= (float)manipCamera.location.y;
@@ -17161,7 +17168,7 @@
             return;
         }
 
-        if (WIREFRAME)
+        //if (WIREFRAME)
             gl.glPolygonMode(gl.GL_FRONT_AND_BACK, gl.GL_FILL);
         
         gl.glDisable(gl.GL_CULL_FACE);
@@ -17261,6 +17268,8 @@
 
         if (WIREFRAME)
             gl.glPolygonMode(gl.GL_FRONT_AND_BACK, gl.GL_LINE);
+        else
+            gl.glPolygonMode(gl.GL_FRONT_AND_BACK, gl.GL_FILL);
     }
 
     private void DrawChecker(GL gl)

--
Gitblit v1.6.2