I am using the most basic implementation of rotate for a directional light (well, for a transform really).
While it does what I want, it doesn’t seem to be working properly.
My transform is set to start at 0,0,0 rotation.
I’m using the docs example
transform.Rotate(Vector3.right * Time.deltaTime);
Not only is it rotating the X axis, but the Y and Z are also increasing at exponential rates.
Now the worst part: once the X axis hits 90 degrees, it pauses for a brief period, and then starts going backwards from 90. The Y and Z get set to 0 and more strange stuff continues. This is really problematic because I want to base some stuff off the rotation of the X axis, and I cannot get passed 90 degrees.
The truly worst part is, everything looks fine in the editor/game preview. The light is in fact rotating 360 degrees continually, but the editor and Debug.Log() tell me it gets to 90 and then starts going backwards. What’s going on?