in unity, if I have it in play mode and I change the rotation of the x axis to 180 degrees, for some unknown reason, the y and z axes rotation become 180 also
1 Answer
1EulerAngles should be set all at once, not individually. Like this:
var oldRotation : Vector3;
oldRotation = transform.eulerAngles;
transform.eulerAngles = Vector3 (180, oldRotation.y, oldRotation.z);
Also, you know you can’t just set rotation.x, right?
you misunderstand, I meant when I change the x axis rotation directly through the inspector view
– awesomeface
Post your code how do you do it
– YoungDeveloper