Model Cockpit View

From FlightGear wiki
Revision as of 20:08, 31 March 2018 by Aepcam (Talk | contribs)

Jump to: navigation, search
This article is a stub. You can help the wiki by expanding it.
Model Cockpit View
Started in 07/2007
Description Model Cockpit View
Maintainer(s) AndersG
Contributor(s) AndersG, Melchior Franz, maybe others
Status Under active development as of 07/2007

Model Cockpit View is a FlightGear addon that allows to switch the view from any AI/MP models and cockpits. It is based on the previous modules model-view.xml, cockpit-view.xml and model2-view.xml. Q/q steps through the available MP/AI aircraft.


Currently the cockpit views starts at (0,0,0) which is a bit of a usability problem - it works for someone that knows it is a bit of a hack but looks bad for anyone else. The Q/q key binding might interfere with aircrafts that use these keys.


AndersG created a version of the addon ([1]) that is available in

wkitty42 is working on the addon. ([2])

Changing the view point

By default, the view point will be at (0,0,0), so the view point will be exactly on the bottom for many models. The viewpoint can be moved up/down/left/right at runtime by pressing RMB+MMB (right and middle mouse buttons) and dragging. Holding control too makes it move forward/aft/left/right instead. The offset so set will apply to all models viewed (i.e. it doesn't change as you switch the model the view follows).

Though this might be useful for analysis purposes, a raised view point is more interesting. The view point can be changed by adding the following code to the addons main.nas file:

        if (type != "multiplayer")
            color = { text: { color: { red: 0.5, green: 0.8, blue: 0.5 }}};
# move view point above back of vehicle.
if (getprop("/sim/current-view/name") == "Model Cockpit View" and name) {
	if (string.match(name,"*gsvehicle*")){
		#Ground Service vehicle
		setprop("/sim/current-view/z-offset-m", 20);
		setprop("/sim/current-view/y-offset-m", 7);
	} else if (string.match(name,"*carrier*")){
		setprop("/sim/current-view/z-offset-m", 110);
		setprop("/sim/current-view/y-offset-m", 47);
	} else {
		setprop("/sim/current-view/z-offset-m", 60);
		setprop("/sim/current-view/y-offset-m", 17);
        if (name)
            gui.popupTip(name, 2, color);

The offset values shown here are just arbitrary.


  1. AndersG  (Aug 14th, 2017).  Re: .
  2. wkitty42  (Aug 13th, 2017).  Re: .