Permalink
Browse files

Fixed wrong BoundingBox transformation, when using negative scaling v…

…alues
  • Loading branch information...
1 parent 500f57a commit 495e0cf6d5603a871aa5b604b068845c9f370b70 @Georgeto Georgeto committed Sep 21, 2015
Showing with 1 addition and 1 deletion.
  1. +1 −1 jme3-core/src/main/java/com/jme3/bounding/BoundingBox.java
@@ -314,7 +314,7 @@ public BoundingVolume transform(Transform trans, BoundingVolume store) {
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());

0 comments on commit 495e0cf

Please sign in to comment.