Browse Source

Let triangle intersections fall right on the edge
the diagonal.

pspeed42 11 years ago
parent
commit
97b8cb7435
1 changed files with 1 additions and 1 deletions
  1. 1 1
      jme3-core/src/main/java/com/jme3/bounding/BoundingSphere.java

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

@@ -844,7 +844,7 @@ public class BoundingSphere extends BoundingVolume {
             float u = (dot11 * dot02 - dot01 * dot12) * invDenom;
             float u = (dot11 * dot02 - dot01 * dot12) * invDenom;
             float v = (dot00 * dot12 - dot01 * dot02) * invDenom;
             float v = (dot00 * dot12 - dot01 * dot02) * invDenom;
             
             
-            if( u >= 0 && v >= 0 && (u + v) < 1 ) {
+            if( u >= 0 && v >= 0 && (u + v) <= 1 ) {
                 // We intersect... and we even know where
                 // We intersect... and we even know where
                 Vector3f part1 = ac;
                 Vector3f part1 = ac;
                 Vector3f part2 = ab;
                 Vector3f part2 = ab;