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:
parent
491c164bd3
commit
aaeb948b9d
@ -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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user