OSDN Git Service

fixed issue 1456, Intersector#intersectRayBounds had a bug
authorbadlogic <badlogicgames@gmail.com>
Thu, 30 May 2013 15:18:55 +0000 (17:18 +0200)
committerbadlogic <badlogicgames@gmail.com>
Thu, 30 May 2013 15:18:55 +0000 (17:18 +0200)
gdx/src/com/badlogic/gdx/math/Intersector.java

index b6267f8..47129a4 100644 (file)
@@ -369,7 +369,7 @@ public final class Intersector {
                Vector3.tmp.set(ray.origin);
                Vector3.tmp2.set(ray.origin);
                Vector3.tmp.sub(box.min);
-               Vector3.tmp.sub(box.max);
+               Vector3.tmp2.sub(box.max);
                if (Vector3.tmp.x > 0 && Vector3.tmp.y > 0 && Vector3.tmp.z > 0 && Vector3.tmp2.x < 0 && Vector3.tmp2.y < 0
                        && Vector3.tmp2.z < 0) {
                        return true;