Fixed an accidental sharing of temp vars vects

that turned out to matter.
experimental
pspeed42 11 years ago
parent d5e20d53d0
commit 0633c0c5bc
  1. 4
      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;

Loading…
Cancel
Save