Is there some logical reason why when my script says:
object.transform.rotation.x = 90;
then the object’s rotation on the x axis will be all sorts of things like 180, but not 90?!
I’m going crazy trying to figure this out!
Is there some logical reason why when my script says:
object.transform.rotation.x = 90;
then the object’s rotation on the x axis will be all sorts of things like 180, but not 90?!
I’m going crazy trying to figure this out!
Transform.rotation is a 4D quaternion. Rotation.x is not the X axis, and it doesn’t use degrees, it uses normalized values from -1.0 to 1.0. Don’t mess with quaternions unless you understand them. Look up Transform.eulerAngles instead, but pay attention to the part of the docs where they tell you not to set one axis by itself.