From f9e99ab95639332809f5d795ac9608bf8b126d19 Mon Sep 17 00:00:00 2001 From: "Sha..rd" Date: Sat, 15 Sep 2012 19:36:42 +0000 Subject: [PATCH] * Fixed rather silly bounding box computation bug. Thanks to @raistm. git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9733 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/core/com/jme3/bounding/BoundingBox.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/engine/src/core/com/jme3/bounding/BoundingBox.java b/engine/src/core/com/jme3/bounding/BoundingBox.java index c8779a6d3..1f6ee22d6 100644 --- a/engine/src/core/com/jme3/bounding/BoundingBox.java +++ b/engine/src/core/com/jme3/bounding/BoundingBox.java @@ -239,19 +239,22 @@ public class BoundingBox extends BoundingVolume { if (vars.vect1.x < minX) { minX = vars.vect1.x; - } else if (vars.vect1.x > maxX) { + } + if (vars.vect1.x > maxX) { maxX = vars.vect1.x; } if (vars.vect1.y < minY) { minY = vars.vect1.y; - } else if (vars.vect1.y > maxY) { + } + if (vars.vect1.y > maxY) { maxY = vars.vect1.y; } if (vars.vect1.z < minZ) { minZ = vars.vect1.z; - } else if (vars.vect1.z > maxZ) { + } + if (vars.vect1.z > maxZ) { maxZ = vars.vect1.z; } }