Hi,
I had a problem recently with an object I wanted to rotate on Y and Z axis.
Specifically, it was an eyeball, and I wanted this eyeball to follow the mouse cursor.
The pupil was on the X axis, and by default, the eyeball was looking to the left, so I was subtracting 90° to rotationZ to make it look at the user.
Then I would play with rotationZ to make it look more to the right or to the left, and rotationY to make it look more to the top or to the bottom.
Rotating on the X axis had of course no useful effect, since the eye was symmetrical around that axis.
But modifying rotationY didn’t work: Instead of going up and down, the eyeball was rotating around the pupil.
So I thought to myself “Maybe the coordinate system is absolute, and by rotating the eyeball -90° on the Z axis to make it look at the screen, I aligned its pupil to the Y axis, so rotating the eyeball on the X axis instead should solve the problem”.
Except that it didn’t. Instead, and to my surprise, rotating the eyeball to the X axis had the EXACT opposite effect as rotating it to the Y axis: it made the eyeball rotate around its pupil, but in the opposite direction.
It was as if the X and Y axis were aligned somehow, thus breaking the coordinate system.
As if rotating the eyeball on the Z axis had modified the X axis’ vector, but not the Y axis vector…
In a nutshell before setting rotationZ to -90, I had this :
http://i.imgur.com/qmrCjiy.png
And after the rotation, I had this :
http://i.imgur.com/qFeS9Hd.png
It makes absolutely no sense, but it’s the only explanation to what I observed.
To solve the problem, I added my eyeball to a container, and set the container rotationZ to -90 instead.
Then, the eyeball’s rotation Y started behaving as I wanted.
But there’s something fundamentally flawed here.
There must be a bug somewhere.
I’m not a geometry master, but I can’t see any situation in which modifying rotationY and rotationX doing pretty much the same thing could make sense…