diff --git a/src/Main/viewer.cxx b/src/Main/viewer.cxx index 16a035f9a..1f6c1d450 100644 --- a/src/Main/viewer.cxx +++ b/src/Main/viewer.cxx @@ -37,11 +37,11 @@ #include #include #include - -#include - +#include #include + #include
+#include #include #include @@ -655,10 +655,13 @@ FGViewer::recalcLookAt () sgAddVec3( eye_pos, eye_pos, position_offset ); // add target offsets to at_position... - sgSetVec3(target_position_offset, _target_z_offset_m, _target_x_offset_m, _target_y_offset_m ); + sgSetVec3(target_position_offset, _target_z_offset_m, _target_x_offset_m, + _target_y_offset_m ); sgXformVec3(target_position_offset, target_position_offset, ATLOCAL); sgAddVec3( at_pos, at_pos, target_position_offset); + sgAddVec3( eye_pos, eye_pos, target_position_offset); + // Make the VIEW matrix for a "LOOKAT". sgMakeLookAtMat4( VIEW, eye_pos, at_pos, _view_up );