void look_at(ENTITY* Vehicle, VECTOR* Destination, ENTITY* Planet)
{
VECTOR V_Nrml;
ANGLE V_Ang;
VECTOR V_Path;
// copy my angle
vec_set(V_Ang, Vehicle.pan);
//get our vehicle's normal from the planet core
vec_diff(V_Nrml, Vehicle.x, Planet.x);
// orientate temporary angle as if on a perfect sphere
alignToVec(V_Ang, V_Nrml, vector(0, 0, 1), 1);
// get destination position relative to the vehicle's orientation
vec_diff(V_Path, Destination, Vehicle.x);
vec_rotateback(V_Path, V_Ang);
// convert to an angle
vec_to_angle(V_Ang, V_Path);
// now, V_Ang's pan is our angle
ang_rotate(Vehicle.pan, vector(V_Ang.pan, 0, 0)); // maybe ang_add?
}