[committed] Ray.intersectsWherePlane()

'Cause jme Plane equation is not " ax + by + cz + d = 0" but " ax + by + cz = d "

The constant should be subtracted instead of being added



Index: src/com/jme/math/Ray.java
===================================================================
--- src/com/jme/math/Ray.java   (revision 4077)
+++ src/com/jme/math/Ray.java   (working copy)
@@ -295,7 +295,7 @@
         if (denominator > -FastMath.FLT_EPSILON && denominator < FastMath.FLT_EPSILON)
             return false; // coplanar
 
-        float numerator = -(p.getNormal().dot(origin) + p.getConstant());
+        float numerator = -(p.getNormal().dot(origin) - p.getConstant());
         float ratio = numerator / denominator;
 
         if (ratio < FastMath.FLT_EPSILON)

YES!! This has been kicking my a** for the last few months. I'll test this out and put it in this weekend.

I'm happy to hear it helps.  :smiley:

I also tested it and worked well.

I'll check it in tomorrow.