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 |   17 ++++++++++++-----
 1 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/CameraPane.java b/CameraPane.java
index 02b265d..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;

--
Gitblit v1.6.2