]> git.mxchange.org Git - flightgear.git/commitdiff
revert swapping of x & y offsets in "lookat" mode
authormfranz <mfranz>
Mon, 5 Nov 2007 22:19:39 +0000 (22:19 +0000)
committermfranz <mfranz>
Mon, 5 Nov 2007 22:19:39 +0000 (22:19 +0000)
This was correct in the old repository and in revision 1.1 of the new,
but then broken in revision 1.2. After that, "lookat" and "lookfrom"
mode used different coordinate systems, and the "Adjust View Distance"
didn't work correctly in "lookat" mode.

src/Main/viewer.cxx

index 9cd807da0b267006addcf5e62053b80e5eca7c98..7c4388b16a78c202ec93d989121b02f40981d602 100644 (file)
@@ -550,7 +550,7 @@ FGViewer::recalcLookAt ()
                                  _roll_offset_deg);
 
   // Offsets to the eye position
-  SGVec3d eyeOff(-_offset_m.z(), _offset_m.y(), -_offset_m.x());
+  SGVec3d eyeOff(-_offset_m.z(), _offset_m.x(), -_offset_m.y());
   SGQuatd ec2eye = geodEyeHlOr*geodEyeOr;
   SGVec3d eyeCart = SGVec3d::fromGeod(geodEyePos);
   eyeCart += (ec2eye*eyeOffsetOr).backTransform(eyeOff);