From 495e0cf6d5603a871aa5b604b068845c9f370b70 Mon Sep 17 00:00:00 2001 From: Georg Date: Mon, 21 Sep 2015 14:28:54 +0200 Subject: [PATCH] Fixed wrong BoundingBox transformation, when using negative scaling values --- jme3-core/src/main/java/com/jme3/bounding/BoundingBox.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jme3-core/src/main/java/com/jme3/bounding/BoundingBox.java b/jme3-core/src/main/java/com/jme3/bounding/BoundingBox.java index 5baf3e3d6..c087950a3 100644 --- a/jme3-core/src/main/java/com/jme3/bounding/BoundingBox.java +++ b/jme3-core/src/main/java/com/jme3/bounding/BoundingBox.java @@ -314,7 +314,7 @@ public class BoundingBox extends BoundingVolume { transMatrix.absoluteLocal(); Vector3f scale = trans.getScale(); - vars.vect1.set(xExtent * scale.x, yExtent * scale.y, zExtent * scale.z); + vars.vect1.set(xExtent * FastMath.abs(scale.x), yExtent * FastMath.abs(scale.y), zExtent * FastMath.abs(scale.z)); transMatrix.mult(vars.vect1, vars.vect2); // Assign the biggest rotations after scales. box.xExtent = FastMath.abs(vars.vect2.getX());