Howto:Configure views in FlightGear: Difference between revisions

Jump to navigation Jump to search
m
Robot: Cosmetic changes
mNo edit summary
m (Robot: Cosmetic changes)
Line 3: Line 3:
Formerly there were two views hard coded into FlightGear, but as this document describes, it is possible to configure any number of views with XML configuration files. Views may be configured to switch between pilot and co-pilot, tower view, or view of an observer on the ground.
Formerly there were two views hard coded into FlightGear, but as this document describes, it is possible to configure any number of views with XML configuration files. Views may be configured to switch between pilot and co-pilot, tower view, or view of an observer on the ground.


==Types of Views==
== Types of Views ==
There are two basic types of views:
There are two basic types of views:


Line 11: Line 11:
(see configuration examples below for usage of the <type> paramter)
(see configuration examples below for usage of the <type> paramter)


==Defining Positions==
== Defining Positions ==
There are two methods to define a postion and orientation for use in configuring a view. One method is tied to a model which means the view references the position and orientation of a model (e.g. Aircraft 3D Model) and the other is an independent postion which simply means that the view references location data directly (via the Flight Gear property tree):
There are two methods to define a postion and orientation for use in configuring a view. One method is tied to a model which means the view references the position and orientation of a model (e.g. Aircraft 3D Model) and the other is an independent postion which simply means that the view references location data directly (via the Flight Gear property tree):


===Tied to a Model===
=== Tied to a Model ===
This method allows definition of the "eye", that is where you are looking from and/or the "target" or objected being looked at based on a model position and orientation. The following illustrates defining the positon of a "Cockpit View" that is positioned and oriented according to the position and orientation of a model:
This method allows definition of the "eye", that is where you are looking from and/or the "target" or objected being looked at based on a model position and orientation. The following illustrates defining the positon of a "Cockpit View" that is positioned and oriented according to the position and orientation of a model:


Line 42: Line 42:
Note that from-model or at-model must be true in order for the position and orientation data from the model to be used.
Note that from-model or at-model must be true in order for the position and orientation data from the model to be used.


===Independent Position===
=== Independent Position ===
This method allows definition of the eye, that is where you are looking from or the target (objected being looked at) based on arbitrary position and orientation data obtained from the property tree (i.e. any source). The following illustrates a Tower defined as a "lookat", a view that can be used to track or follow a moving model:
This method allows definition of the eye, that is where you are looking from or the target (objected being looked at) based on arbitrary position and orientation data obtained from the property tree (i.e. any source). The following illustrates a Tower defined as a "lookat", a view that can be used to track or follow a moving model:


Line 98: Line 98:
     <target-alt-ft-path>path-to-property-value</target-alt-ft-path>
     <target-alt-ft-path>path-to-property-value</target-alt-ft-path>


==View Offsets==
== View Offsets ==
There are two types of offsets, but only one is used in building viewer configurations. This is an offset from the eye position applied to the position defined for the eye as described in the section on '''Defining Positon'''.
There are two types of offsets, but only one is used in building viewer configurations. This is an offset from the eye position applied to the position defined for the eye as described in the section on '''Defining Positon'''.


Line 211: Line 211:
   </view>
   </view>


==Related content==
== Related content ==
* To make parts of the aircraft only appear in a specific view, read the [[Howto: Objects visible according to views]]
* To make parts of the aircraft only appear in a specific view, read the [[Howto: Objects visible according to views]]


[[Category:Howto|Configure views in FlightGear]]
[[Category:Howto|Configure views in FlightGear]]

Navigation menu