Usually for cameras one only uses the LookAt transform, however you are of course free to use a compound transformation as shown above.
Transformations are applied last to first. That is, if you have
- Code: Select all
LookAt 0 0 0 0 0 1 0 1 0
Translate 0 -50 0
Rotate -180 1 0 0
Then it will first rotate -180 degrees along the x axis, then translate -50 units along the y axis, and then concatenate with the LookAt transformation. As such I suspect you might want to try putting the LookAt last, ie
- Code: Select all
Translate 0 -50 0
Rotate -180 1 0 0
LookAt 0 0 0 0 0 1 0 1 0
Also, when using Rotate for each axis, keep gimbal lock in mind. Depending on the application you're writing an exporter for, you might get the orientation of an object or camera as a matrix. In that case you should use it with the Transform command, to avoid gimbal lock and other tricky issues with rotation.
May contain traces of nuts.