0
$\begingroup$

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 YXZ as 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 z axis.

Does anyone know to to solve this problem? Is it for example possible to change the axis system of the camera?

$\endgroup$
  • $\begingroup$ If we look through your ideal camera, does X point right, Y point up, and Z point towards us? $\endgroup$ – Leander May 11 '18 at 15:25
  • $\begingroup$ @Leander. That is how it is at the moment. Is it possible to switch Y and Z? Any other solution would also be welcome. $\endgroup$ – McLawrence May 11 '18 at 15:30
  • $\begingroup$ Ok, so you want X to point right (pitch), Y to point towards us [not away!] (roll) and Z to point up (yaw), correct? And when changing the Roll, the other axes don't change, and when changing the pitch, the yaw axis doesn't change. Then yaw axis changes both other axes, correct? $\endgroup$ – Leander May 11 '18 at 15:33
  • $\begingroup$ thats correct: I basically want to be able to read of yaw pitch and roll from the rotation_euler property, which is not possible because if the camera rotation is (0, 0, 0), the camera faces down. $\endgroup$ – McLawrence May 11 '18 at 15:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.