----- Original Message -----
From: "Jim Wilson" <[EMAIL PROTECTED]>
To: <flightgear-devel@lists.sourceforge.net>
Sent: Wednesday, April 05, 2006 6:22 AM
Subject: Re: [Flightgear-devel] instrument panels on views from outside the
aircraft
From: John Kluza
<snip>
My real question though is can I make a panel visible from one of the
other
perspectives in which the observer views the aircraft from outside? In
this
way, it would be like watching the uav fly around but seeing the
instruments
at the same time.
I do this, so I know it is possible.
Thanks a lot!
John
That mini panel or something like it was my first contribution to
flightgear and was really the result of a screw up that looked cool.
By itself it won't do exactly what you want. The reasohn is that the
aircraft model is hidden in the pilot view when the 2D cockpit
mode is used (i.e. when 3D virtual cockpit is turned off in the config).
To make the aircraft model visible, I *believe* all you have to do is set
the view type to internal. Also,
you might need to adjust the near clipping plane distance in renderer.cxx
if you define a view that
is close to the aircraft. It is hardcoded in there, but it would probably
be better if it were set as a property.
If you don't want to modify code, then make sure your distance from the
aircraft is large enough
and adjust the default field of view parameter for the view (see below).
Take a look at the c172 with the 3D cockpit (or any of the aircraft with a
2D panel placed in a 3D cockpit). You will find in
the model configuration where the panel position is set. That position is
relative to the aircraft and can be placed anywhere in
relation to the aircraft including outside. Configured offsets can be
applied to the pilot eye point to move it anwhere in relation
to the aircraft. The panel itself can be animated as a whole with
rotations from any angle applied (to make it appear fixed to the camera).
Here are 2 examples of what I use. One if from behind the aircraft and the
other is off the right wing.
Both look at the aircraft and move with it. Like Jim said, you can set the
eye lat/lon/alt to a fixed
position if you want a tower type view. These go in preferences.xml
inside of the block
<sim>
....
</sim>
examples:
<view>
<name>Trail View</name>
<type>lookat</type>
<internal type="bool">true</internal>
<config>
<from-model type="bool">false</from-model>
<from-model-idx type="int">0</from-model-idx>
<eye-lat-deg-path>/position/latitude-deg</eye-lat-deg-path>
<eye-lon-deg-path>/position/longitude-deg</eye-lon-deg-path>
<eye-alt-ft-path>/position/altitude-ft</eye-alt-ft-path>
<eye-heading-deg-path>/orientation/heading-deg</eye-heading-deg-path>
<at-model type="bool">true</at-model>
<at-model-idx type="int">0</at-model-idx>
<target-z-offset-m type="double">0</target-z-offset-m>
<at-model-roll-damping type="double">0.0</at-model-roll-damping>
<at-model-pitch-damping type="double">1.5</at-model-pitch-damping>
<at-model-heading-damping type="double">2.5</at-model-heading-damping>
<ground-level-nearplane-m type="double">0.5f</ground-level-nearplane-m>
<default-field-of-view-deg
type="double">55.0</default-field-of-view-deg>
<x-offset-m type="double">8</x-offset-m>
<y-offset-m type="double">0</y-offset-m>
<z-offset-m alias="/sim/chase-distance-m"/>
</config>
</view>
<view>
<name>Right Side View</name>
<type>lookat</type>
<internal type="bool">true</internal>
<config>
<from-model type="bool">false</from-model>
<from-model-idx type="int">0</from-model-idx>
<eye-lat-deg-path>/position/latitude-deg</eye-lat-deg-path>
<eye-lon-deg-path>/position/longitude-deg</eye-lon-deg-path>
<eye-alt-ft-path>/position/altitude-ft</eye-alt-ft-path>
<eye-heading-deg-path>/orientation/heading-deg</eye-heading-deg-path>
<at-model type="bool">true</at-model>
<at-model-idx type="int">0</at-model-idx>
<at-model-heading-damping type="double">0.0</at-model-heading-damping>
<target-z-offset-m type="double">0.0</target-z-offset-m>
<ground-level-nearplane-m
type="double">0.5f</ground-level-nearplane-m>
<default-field-of-view-deg
type="double">55.0</default-field-of-view-deg>
<x-offset-m type="double">1</x-offset-m>
<y-offset-m alias="/sim/chase-distance-m"/>
<z-offset-m type="double">0</z-offset-m>
</config>
</view>
Best,
Jim
--
Jim Wilson
Kelco Industries
PO Box 160
Milbridge, ME 04658
207-546-7989
Good luck,
Phil
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel