My co-ordinate system defines
y as up and defines yaw as rotation from
x in the xy plane.
I have a vector that defines a direction (my target's facing direction).
I have another direction (my camera direction) defined as a pitch and yaw. I can derive a direction vector from this information.
What different ways can I determine the change in yaw and pitch required to make the camera vector point in the same direction as the target vector?
I can project the target vector on the xz plane (in my system, y is up) by removing the y element. Then I can normalize and dot with the x unit vector to get the yaw, but I can't do something similar for pitch since pitch isn't relative to only x or z. (Is that right?)