Parcourir la source

Fix to object positioning when Y axis is set to be UP axis.

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7699 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
Kae..pl il y a 14 ans
Parent
commit
aaeb948b9d

+ 2 - 2
engine/src/blender/com/jme3/scene/plugins/blender/helpers/v249/ObjectHelper.java

@@ -302,10 +302,10 @@ public class ObjectHelper extends AbstractBlenderHelper {
 		Vector3f scale = new Vector3f(size.get(0).floatValue() * scaleX, 
 									  size.get(1).floatValue() * scaleY, 
 									  size.get(2).floatValue() * scaleZ);
-		if(fixUpAxis) {
+		if(parent.isNull() && fixUpAxis) {
 			float y = translation.y;
 			translation.y = translation.z;
-			translation.z = y;
+			translation.z = -y;
 			rotation.multLocal(this.upAxisRotationQuaternion);
 		}
 		Transform t = new Transform(translation, rotation);