Просмотр исходного кода

Bugfix: fixed an issue that caused repeated meshes to be populated in the wrong direction when Y axis was set as up axis.

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10748 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
Kae..pl 12 лет назад
Родитель
Сommit
0bb9822322

+ 6 - 1
engine/src/blender/com/jme3/scene/plugins/blender/modifiers/ArrayModifier.java

@@ -199,7 +199,12 @@ import java.util.logging.Logger;
         }
 
         Vector3f translationVector = new Vector3f(offset[0] + scale[0] + objectOffset[0], offset[1] + scale[1] + objectOffset[1], offset[2] + scale[2] + objectOffset[2]);
-
+        if(blenderContext.getBlenderKey().isFixUpAxis()) {
+            float y = translationVector.y;
+            translationVector.y = translationVector.z;
+            translationVector.z = y == 0 ? 0 : -y;
+        }
+        
         // getting/calculating repeats amount
         int count = 0;
         if (fittype == 0) {// Fixed count