Hi.
First of all, you guys are always getting help Thank you.
This is my simple code
Hello.prototype.initialize = function() {
var initAngle = this.entity.getLocalEulerAngles();
console.log(initAngle);
// Case 1 : It's works!
// this.entity.setLocalEulerAngles(initAngle.x, initAngle.y + 90, initAngle.z);
// console.log(this.entity.getLocalEulerAngles());
// Case 2 : It's works!
// this.entity.setLocalEulerAngles(initAngle.x + 20, initAngle.y, initAngle.z);
// console.log(this.entity.getLocalEulerAngles());
// Case 3 : Is world z axis??
// this.entity.setLocalEulerAngles(initAngle.x, initAngle.y, initAngle.z + 20);
// console.log(this.entity.getLocalEulerAngles());
};
uncomment in order.
Default: {x: 0, y: 0, z: 0}
Case 1:.setLocalEulerAngles(initAngle.x, initAngle.y + 90, initAngle.z)
{x: 0, y: 90, z: 0}
Case 2:setLocalEulerAngles(initAngle.x + 20, initAngle.y, initAngle.z)
{x: 20, y: 90, z: 0} Case 3:setLocalEulerAngles(initAngle.x, initAngle.y, initAngle.z + 20) {x: 2.248991783197472e-15, y: 90, z: 0} …??? (Z is still 0)
My prediction is that the box should lean forward, When run case 3 ,but it is not.
Case 3 rotates like world z-axis…
Is there any way to return to the same state as the Default case, regardless of the order?
Actually, Now I’m making three slider(x,y,z) axis, but it is very difficult…
Because of ordering
Move the y-axis and the z-axis.
for back to original, Move the y-axis and the z-axis
it doesn’t return to its original state, Only same when Move the z-axis and the y-axis