unexpected axis values when a sphere rotates 360 degrees around a game object

I'm experiencing some weird behavior that I cannot explain. Im using an empty game object as a central point ("origin") where a second game object (a sphere) revolves around it, completely. This is meant to mimic the rotation of the sun, in a full day-night cycle.

Firstly, I would have expected that the rotational (transform.eulerAngles.y) value would change along the y-axis as this game object moves/rotates around the origin. Instead, it is the (transform.eulerAngles.x) that is changing. I can't explain why?

Secondly, more importantly, I would have expected the transform.eulerAngles.x to return the degrees of 0-359. Instead, once the sphere hits 90 degrees, the transform.eulerAngles.y and transform.eulerAngles.z values flip from being "0" - to each being "180"... and the transform.eulerAngles.x decrements itself from 90 back to 0 again (where it really should have been 180 degrees).

I expected the sphere to increment beyond 90 degrees, and did not expect the other axis values to flip to 180 each.

I know I'm doing something completely wrong here. But I cannot figure out what? Does anyone have any suggestions? Answers?

Some code would help -- are you using `transform.Rotate(1,0,0);` if so, then, yes, you are rotating around x.

The flipping numbers are probably classic gimbal lockish stuff. Some directions have multiple ways of rotating to get them. For example, a 180 degree y-spin is the same as a 180 z followed by a 180 on x. If you look, Rotate does the rotations in Local z, then x then y. So, if you get turned on your side, then a y rotation really is an x rotate (in world, non-local, space.)

Quaternions were invented (really, stolen) to solve this, but they are tricky to learn.

If the spin works, just ignore the numbers. It's a little like how Unity snaps -10 degrees to 350 degrees. If it's causing problems, try directly setting angles. Create `Vector3 Angles;` and set Angles.x, Angles.y, Angles.z yourself (add 1 degree, or something) and set with with `transform.eulerAngles = Angles;`. That will prevent Unity from snapping them around (it still will, but not on your copy.)