From: curt Date: Thu, 12 Jul 2001 20:03:37 +0000 (+0000) Subject: "Fix a bug" in mouse-pans-external view mode. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c0309ef524df05e86d529661e839e98341c23cba;p=flightgear.git "Fix a bug" in mouse-pans-external view mode. --- diff --git a/src/Main/viewer_lookat.cxx b/src/Main/viewer_lookat.cxx index e45b0f5bb..f39c08bf1 100644 --- a/src/Main/viewer_lookat.cxx +++ b/src/Main/viewer_lookat.cxx @@ -133,7 +133,26 @@ void FGViewerLookAt::update() { sgdVec3 vp; sgdSubVec3( vp, abs_view_pos, sc ); sgSetVec3( view_pos, vp ); - sgAddVec3( view_pos, pilot_offset ); + + sgVec3 tmp_offset; + sgCopyVec3( tmp_offset, pilot_offset ); + SG_LOG( SG_VIEW, SG_DEBUG, "tmp offset = " + << tmp_offset[0] << "," << tmp_offset[1] << "," + << tmp_offset[2] ); + + //!!!!!!!!!!!!!!!!!!! + // THIS IS THE EXPERIMENTAL VIEWING ANGLE SHIFTER + // THE MAJORITY OF THE WORK IS DONE IN GUI.CXX + extern float GuiQuat_mat[4][4]; + sgXformPnt3( tmp_offset, tmp_offset, GuiQuat_mat ); + SG_LOG( SG_VIEW, SG_DEBUG, "tmp_offset = " + << tmp_offset[0] << "," << tmp_offset[1] << "," + << tmp_offset[2] ); + + sgAddVec3( view_pos, tmp_offset ); + // !!!!!!!!!! testing + + // sgAddVec3( view_pos, pilot_offset ); SG_LOG( SG_VIEW, SG_DEBUG, "sea level radius = " << sea_level_radius ); SG_LOG( SG_VIEW, SG_DEBUG, "Polar view pos = " << p ); @@ -176,14 +195,6 @@ void FGViewerLookAt::update() { // << world_up[2] << endl; - //!!!!!!!!!!!!!!!!!!! - // THIS IS THE EXPERIMENTAL VIEWING ANGLE SHIFTER - // THE MAJORITY OF THE WORK IS DONE IN GUI.CXX - // this in gui.cxx for now just testing - extern float GuiQuat_mat[4][4]; - sgPreMultMat4( VIEW, GuiQuat_mat); - // !!!!!!!!!! testing - // Given a vector pointing straight down (-Z), map into onto the // local plane representing "horizontal". This should give us the // local direction for moving "south".