From 97b8cb7435b570bc41448f1a6167357239388563 Mon Sep 17 00:00:00 2001 From: pspeed42 Date: Tue, 12 Aug 2014 02:45:36 -0400 Subject: [PATCH] Let triangle intersections fall right on the edge the diagonal. --- jme3-core/src/main/java/com/jme3/bounding/BoundingSphere.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jme3-core/src/main/java/com/jme3/bounding/BoundingSphere.java b/jme3-core/src/main/java/com/jme3/bounding/BoundingSphere.java index 3a175e83b..18be750f1 100644 --- a/jme3-core/src/main/java/com/jme3/bounding/BoundingSphere.java +++ b/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 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 Vector3f part1 = ac; Vector3f part2 = ab;