Hi! I have this simple formula, setting euler angle:
Debug.Log("Eugelar in?" + RotX[j]+" " + RotY[j] + " " + RotZ[j]);
Planes[j].transform.eulerAngles = new Vector3(RotX[j], RotY[j], RotZ[j]);
Debug.Log("Eugelar out?" + Planes[j].transform.eulerAngles);
—in: 45, 0, 0
Eugelar in?315 0 0
Eugelar out?(315,0, 0.0, 0.0)
—in: 270, 45, 0
Eugelar in?270 45 0
Eugelar out?(270.0, 45.0, 0.0)
—in: 270, 45, 45
Eugelar in?270 45 45
Eugelar out?(270.0, 90.0, 0.0)
I know that I can not rely on Unity eugelar output values, but what I get is just nonsense. I never hav actual rotation around Z value. It just rotates object around Y. I tried commenting that line, thinking that maybe somethign else in my code affects it, but seems like this is the only line of code doing rotations. How come? I remember I had it working long ago, maybe somethign changed within Unity 4?