Calculate rotation to object


#1

Hey guys,
I’m trying to iterate through all camera in a scene and measure the rotation of one axis off all cameras. Not that hard, but now comes the tricky part.
I would like to measure the rotation it would take in order to look at another camera. So as I would add a “lookAtConstraint” from cam01 to cam02 and then measure the rotation value of cam01. And then iterate all cams: cam01 -> cam02, cam01 -> cam03 / cam02->cam01, cam02 -> cam03 etc.

At the moment I would think of reading the inital rotation, then apply a lookat and then measure the rotation again, and divide that values. Or is there a simpler method like the “distance” attribute for example?