David Megginson writes:

 > 3. The orientation is incorrect when the view is not straight forward
 > and the plane is not flying level (waiting for a fix from me, but I
 > don't understand matrix math well enough) -- that means that when you
 > look out the side window during a climb or turn, the model will not be
 > tilted correctly.

Further to this point, could someone who understands matrix math take
a look at src/Main/model.cxx, in the update() method?  Where I have

    if (view_number == 0) {
                                // FIXME: orientation is not applied
                                // correctly when view is not forward
      sgMakeRotMat4( sgROT, -pilot_view->get_view_offset()
                     * SGD_RADIANS_TO_DEGREES, pilot_view->get_world_up() );
      sgPreMultMat4( sgTRANS, sgROT );
    }

I'm trying to keep the model from following the view around.
Obviously, I have to do some rotations in other planes as well, but
I'm not quite sure how to do it.


Thanks, and all the best,


David

-- 
David Megginson
[EMAIL PROTECTED]


_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to