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.
This commit is contained in:
parent
575b3ac98c
commit
8ef4374edb
1 changed files with 7 additions and 4 deletions
|
@ -37,11 +37,11 @@
|
|||
#include <simgear/math/point3d.hxx>
|
||||
#include <simgear/math/polar3d.hxx>
|
||||
#include <simgear/math/sg_geodesy.hxx>
|
||||
|
||||
#include <Scenery/scenery.hxx>
|
||||
|
||||
#include <simgear/scene/model/location.hxx>
|
||||
#include <simgear/math/vector.hxx>
|
||||
|
||||
#include <Main/globals.hxx>
|
||||
#include <Scenery/scenery.hxx>
|
||||
#include <Model/acmodel.hxx>
|
||||
#include <Model/placement.hxx>
|
||||
|
||||
|
@ -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 );
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue