Andy Ross writes: > >Norman Vine wrote: > > Here is some code to translate the HUD with the eye vector > > for those that want to play :-) > >That won't work, though.
Hey I already said that :-) >>>Well you can use glTranslate() to 'sort of' roll the HUD to stay in the >>> 'straight ahead' position, but this is a 'hack' at best. >The problems I was looking at have to do with the use of pixel >coordinates in the HUD. Right now, there's a "compression-ratio" >parameter in the HUD code that controls the pixel-to-angle convertion >ratio. I can't quite figure out the units, but it's very sensitive to >aspect ratio and screen size. Change either, and it breaks. A >"virtual cockpit" HUD has to be insensitive to panning and zooming; >this one isn't, and I can't see a simple way to make it so. Been there, tried that, wasted lots of time, decided it would be BETTER and EASIER to do it properly some day but if you want to go for it I would forget about the aspect adjust < compression-ratio > and just think of it as a virtual 640x480 device projected by openGL with the glOrtho2d( 0, 640, 0, 480 ) call, this will work fine in a standard full screen window on most systems. The aspect adjust is only there for when both the Panel and the HUD are displayed at the same time and/or for when the Screen is not at 4x3 inorder to preserve the overall shape. We can deal with this later Come to think of it this has probably changed since the overall fov changes were made. Hmmm... I see that the effective focal lenght of the eye lens changes radically when you change the aspect ratio of the window. Before when you made the window wider then 4/3 the FOV automagically increased and visa-versa when you made it skinnier. Now you have to change the FOV manually, that doesn't seem right. Oh well that's the camera model that everybody wanted. :-( This complicates your pixel-compression problem considerably. Good Luck Norman _______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
