From 0944ab91c2f5723f4ea275a18ec55810ec9de8a5 Mon Sep 17 00:00:00 2001 From: david Date: Wed, 27 Mar 2002 15:53:15 +0000 Subject: [PATCH] Patch from Melchior Franz: The matrix doesn't define some cells, which are actually used in the multiplication. That makes the result unpredictable. I have no idea if 0.0 is the correct value for these, but garbage is hardly the correct value either. Should some of them be set to 1.0? --- src/Main/viewer.cxx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Main/viewer.cxx b/src/Main/viewer.cxx index b5a90a470..e213a1993 100644 --- a/src/Main/viewer.cxx +++ b/src/Main/viewer.cxx @@ -572,12 +572,19 @@ FGViewer::recalc () VIEW[0][0] = right[0]; VIEW[0][1] = right[1]; VIEW[0][2] = right[2]; + VIEW[0][3] = 0.0; VIEW[1][0] = forward[0]; VIEW[1][1] = forward[1]; VIEW[1][2] = forward[2]; + VIEW[1][3] = 0.0; VIEW[2][0] = _view_up[0]; VIEW[2][1] = _view_up[1]; VIEW[2][2] = _view_up[2]; + VIEW[2][3] = 0.0; + VIEW[3][0] = 0.0; + VIEW[3][1] = 0.0; + VIEW[3][2] = 0.0; + VIEW[3][3] = 0.0; // multiply the OFFSETS (for heading and pitch) into the VIEW sgPostMultMat4(VIEW, VIEW_OFFSET);