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
This commit is contained in:
Kae..pl 2011-06-23 14:10:03 +00:00
parent 491c164bd3
commit aaeb948b9d

View File

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