Explorar el Código

Fixed an accidental sharing of temp vars vects
that turned out to matter.

pspeed42 hace 11 años
padre
commit
0633c0c5bc
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      jme3-core/src/main/java/com/jme3/bounding/BoundingSphere.java

+ 2 - 2
jme3-core/src/main/java/com/jme3/bounding/BoundingSphere.java

@@ -888,7 +888,7 @@ public class BoundingSphere extends BoundingVolume {
     
             t = -edge.dot(base) / edge.dot(edge);
             if( t >= 0 && t <= 1 ) {
-                Vector3f Q = base.add(edge.mult(t, tvars.vect7), tvars.vect8);
+                Vector3f Q = base.add(edge.mult(t, tvars.vect7), tvars.vect9);
                 float distSq = Q.dot(Q); // distance squared to origin
                 if( distSq < nearestDist ) {
                     nearestPt = Q;
@@ -903,7 +903,7 @@ public class BoundingSphere extends BoundingVolume {
     
             t = -edge.dot(base) / edge.dot(edge);
             if( t >= 0 && t <= 1 ) {
-                Vector3f Q = base.add(edge.mult(t, tvars.vect7), tvars.vect8);
+                Vector3f Q = base.add(edge.mult(t, tvars.vect7), tvars.vect10);
                 float distSq = Q.dot(Q); // distance squared to origin
                 if( distSq < nearestDist ) {
                     nearestPt = Q;