From 8ef4374edb8b61c0ba19d6c270fb21a91a29867d Mon Sep 17 00:00:00 2001 From: ehofman Date: Fri, 9 May 2003 08:31:14 +0000 Subject: [PATCH] Jim Wilson: What is actually happening is the camera is pointing to the right place (try zooming in), but the camera is also travelling up and down with the nose and it should be staying more steady (in sync with the CG altitude). Attached is a fix for this. There is still something a little funky going on with the camera, but this solves the biggest problem. You will note that I deleted an unecessary reference to scenery.hxx in the patch. --- src/Main/viewer.cxx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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 );