Understanding and fixing compound rotation quirks
In the previous section, you had the chance to experiment with moving the camera around in its 3D environment so you could explore looking at the environment from different angles. While moving the camera is elementary, adding rotations seems to introduce undesired results. In this section, you will discover the source of these issues and look at how to fix them.
Imagine you are holding a camera and looking through it toward the horizon. Now bend down at the hip by 90 degrees so that the camera is looking straight at the ground. Next, rotate your upper body 90 degrees upward to the left. You might be thinking along the steps shown in Figure 15.3. First rotating around the x axis turns the camera to face downward making its y axis horizontal and then a rotation around the y axis will face the camera sideways and result in the x axis sitting horizontally. In performing these orientations, we assume each axis can move independently...