Here's a helpful little function to get the Pitch and Yaw to a target vector.
GetDirectionTo Function
Code:
/* VRageMath.Vector3D TV This is the target vector. IMyTerminalBlock Origin Origin block. IMyTerminalBlock Forward Block directly in front of the origin. IMyTerminalBlock Up Block directly above the origin. IMyTerminalBlock Right Block directly to the right of the origin. ref double Pitch Reference to Pitch. ref double Yaw Reference to Yaw. */...