And before you asked, I know what Gimble Lock means. I suppose the reason the other rotational axes change is Unity’s solution to the gimble lock. I would just like to converse in more details if that really is the reason why the rotational values change, and how does changing the other rotational values solve it?
If anyone has more in depth feedback and/or reading material for me as to why Unity is doing it like that, I would appreciate it.
Unity uses Quaternions, but the representation you see is in Euler angles. As you may know, multiple sets of different Euler angles can be used to represent the same rotation.
Let your arm hang down to the ground, with your palm facing behind you.
Now simply lift up your lower arm. (If you were the camera, that would be a rotation about the X axis.)
Notice how your hand is positioned. The palm should look foward.
Now try this:
Again, let your arm hang down again like before, with the palm facing behind you.
Rotate your arm length-wise, so that the palm is facing forwards. (Rotate about Y.)
Lift up your lower arm beside you. (Rotate about Z.)
You should end up in the same position like before, with your palm looking forward.
As you can see, multiple rotations using completely different Euler angles can lead to the same end result.
As a consequence, if you use Euler angles to construct Quaternions, the Euler angles you will get back from the Quaternion will not always be the same you used to construct the Quaternion in the first place. As a further consequence, since Unity is using Quaternions internally, you can see the Euler angles representation in the Inspector window change quite rapidly, even though the actual rotation you performed was very small.