Bugfix: fixed an issue that was recently introduced with not negating Y-rotation values when Y axis was up.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10946 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
767231a4a8
commit
a499e972ab
@ -168,6 +168,9 @@ public class Ipo {
|
|||||||
translation[0] = (float) value;
|
translation[0] = (float) value;
|
||||||
break;
|
break;
|
||||||
case AC_LOC_Y:
|
case AC_LOC_Y:
|
||||||
|
if(fixUpAxis && value != 0) {
|
||||||
|
value = -value;
|
||||||
|
}
|
||||||
translation[yIndex] = (float) value;
|
translation[yIndex] = (float) value;
|
||||||
break;
|
break;
|
||||||
case AC_LOC_Z:
|
case AC_LOC_Z:
|
||||||
@ -179,11 +182,10 @@ public class Ipo {
|
|||||||
objectRotation[0] = (float) value * degreeToRadiansFactor;
|
objectRotation[0] = (float) value * degreeToRadiansFactor;
|
||||||
break;
|
break;
|
||||||
case OB_ROT_Y:
|
case OB_ROT_Y:
|
||||||
if (fixUpAxis) {
|
if(fixUpAxis && value != 0) {
|
||||||
objectRotation[yIndex] = value == 0.0f ? 0 : (float) -value * degreeToRadiansFactor;
|
value = -value;
|
||||||
} else {
|
|
||||||
objectRotation[yIndex] = (float) value * degreeToRadiansFactor;
|
|
||||||
}
|
}
|
||||||
|
objectRotation[yIndex] = (float) value * degreeToRadiansFactor;
|
||||||
break;
|
break;
|
||||||
case OB_ROT_Z:
|
case OB_ROT_Z:
|
||||||
objectRotation[zIndex] = (float) value * degreeToRadiansFactor;
|
objectRotation[zIndex] = (float) value * degreeToRadiansFactor;
|
||||||
@ -208,10 +210,13 @@ public class Ipo {
|
|||||||
quaternionRotation[0] = (float) value;
|
quaternionRotation[0] = (float) value;
|
||||||
break;
|
break;
|
||||||
case AC_QUAT_Y:
|
case AC_QUAT_Y:
|
||||||
quaternionRotation[fixUpAxis ? 1 : 2] = (float) value;
|
if(fixUpAxis && value != 0) {
|
||||||
|
value = -value;
|
||||||
|
}
|
||||||
|
quaternionRotation[yIndex] = (float)value;
|
||||||
break;
|
break;
|
||||||
case AC_QUAT_Z:
|
case AC_QUAT_Z:
|
||||||
quaternionRotation[fixUpAxis ? 2 : 1] = (float) value;
|
quaternionRotation[zIndex] = (float) value;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
LOGGER.log(Level.WARNING, "Unknown ipo curve type: {0}.", bezierCurves[j].getType());
|
LOGGER.log(Level.WARNING, "Unknown ipo curve type: {0}.", bezierCurves[j].getType());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user