From b3ae4e889872ca0b9ca76f1d17b2f0b961226729 Mon Sep 17 00:00:00 2001
From: Normand Briere <nbriere@noware.ca>
Date: Mon, 05 Aug 2019 21:48:55 -0400
Subject: [PATCH] Fix physics UI

---
 GenericJoint.java |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/GenericJoint.java b/GenericJoint.java
index 1119276..4c7c0e0 100644
--- a/GenericJoint.java
+++ b/GenericJoint.java
@@ -557,7 +557,8 @@
                 bRep.startvertices = new int[numObjects];
             bRep.averagepoints = new float[(bRep.startvertices.length-1) * 3];
             bRep.extremepoints = new float[(bRep.startvertices.length-1) * 3];
-            bRep.supportsizes = new float[(bRep.startvertices.length-1)];
+            bRep.supportminsize = new float[(bRep.startvertices.length-1)];
+            bRep.supportmaxsize = new float[(bRep.startvertices.length-1)];
                 buildrep = true;
                 
                 initialmatrices = new ObjectArrayList<Transform>();
@@ -1225,11 +1226,12 @@
                                 }
                                 else
                                 {
-                                    if (bRep.averagepoints == null || bRep.extremepoints == null || bRep.supportsizes == null)
+                                    if (bRep.averagepoints == null || bRep.extremepoints == null || bRep.supportminsize == null || bRep.supportmaxsize == null)
                                     {
                                         bRep.averagepoints = new float[(bRep.startvertices.length-1) * 3];
                                         bRep.extremepoints = new float[(bRep.startvertices.length-1) * 3];
-                                        bRep.supportsizes = new float[(bRep.startvertices.length-1)];
+                                        bRep.supportminsize = new float[(bRep.startvertices.length-1)];
+                                        bRep.supportmaxsize = new float[(bRep.startvertices.length-1)];
                                     }
                                     
                                     float averagex = 0;
@@ -1299,7 +1301,8 @@
                                         }
                                     }
                                     
-                                    bRep.supportsizes[currentobject-1] = (float)Math.sqrt(mindist2);
+                                    bRep.supportminsize[currentobject-1] = (float)Math.sqrt(mindist2);
+                                    bRep.supportmaxsize[currentobject-1] = (float)Math.sqrt(maxdist2);
                                 }
 
 //                                if (hull.numTriangles() > 0)

--
Gitblit v1.6.2