I want to do two things:
Set the yaw, pitch and roll of the camera and the reverse, extract yaw, pitch and roll from the camera.
I got some confusions using the rotations in Blender. I use the Euler rotation modes. As I understand, for example
XYZ Euler means first a rotation around the local (and global) z axis, followed by rotation around the global Y and then X axis. Thus, to set yaw pitch roll for a normal object, one would use
z is the yaw,
x the pitch and
y the roll.
The problem comes when using cameras: For cameras the typical
z axis (pointing upwards) would be the
y axis, while
x is still pitch and
z is roll. However, it does not simply work to use
ZXY Euler since one has to first turn the camera about 90 degrees in
x direction to align local
y and global
Does anyone know to to solve this problem? Is it for example possible to change the axis system of the camera?