CAMERA VARIABLES

The tables below indicate the requirements for the Simulation Variables that can be used to get and set the different properties for the available game cameras. For information on the units listed for each variable, please see here: Simulation Variable Units

NOTE: When Microsoft Flight Simulator is running in multiplayer mode, only a small number of variables are communicated between aircraft. Those variables that are available will say so in the description as being either for "All Aircraft" or for "Shared Cockpit".

You can find a complete index of all available SimVars here: SimVar Index

 

 

Cameras

Simulation Variable Description Units Settable
CAMERA GAMEPLAY PITCH YAW:index Returns either the pitch (index 0) or the yaw (index 1) of the current gameplay camera. Radians
CAMERA REQUEST ACTION This can be used to have the currently active camera perform a predefined action. Currently only 1 action is supported, but more may be added over time.

Enum:

  1. 1 = Reset Active Camera (in VR this will recenter the headset view) 
CAMERA STATE

This can be used to get or set the camera "state", which will be one of the listed enum values.

Note that not ALL possible enum values are shown, since some values are internal only, and some values will do nothing, but have been reserved for future expansion of the camera system.

Also note that the value "9" is a special case, generally used only when working with in-sim panels and is used to go to the showcase cameras, defaulting to the last selected camera within this section (Drone, Fixed or Environment).

Enum:

  1. 2 = Cockpit
  2. 3 = External/Chase
  3. 4 = Drone
  4. 5 = Fixed on Plane
  5. 6 = Environment
  6. 7 = Six DoF
  7. 8 = Gameplay
  8. 9 = Showcase
  9. 10 = Drone Aircraft
  10. 11 = Waiting
  11. 12 = World Map
  12. 13 = Hangar RTC
  13. 14 = Hangar Custom
  14. 15 = Menu RTC
  15. 16 = In-Game RTC
  16. 17 = Replay
  17. 19 = Drone Top-Down
  18. 21 = Hangar
  19. 24 = Ground
  20. 25 = Follow Traffic Aircraft

 

CAMERA SUBSTATE This variable can be used to get or set the camera "sub-state". The options here are generally only required when working with the in-sim panel UI. Note that the "locked" and "unlocked" state will be changed automatically if the following SimVars have their values changed: COCKPIT_CAMERA_HEADLOOK, CHASE_CAMERA_HEADLOOK.

Enum:

  1. 1 = Locked (Fixed look or chase lock -

    The camera is locked in position
    )
  2. 2 = Unlocked (Head look or Chase

    normal - The camera is "attached" to

    the mouse
    )
  3. 3 = Quickview (the camera is

    currently using a Quickview
    )
  4. 4 = Smart (The camera has Smart

    camera active
    )
  5. 5 = Instrument (The camera is

    focused on an instruments panel
    )
CAMERA VIEW TYPE AND INDEX:index

With this you can get or set both the type of view for the current camera, as well as the option index, which will be between 0 and the maximum index value (as retrieved using the CAMERA VIEW TYPE AND INDEX MAX SimVar). Supplying an index of 0 to the SimVar will get/set the type (from the selection of enum values listed), and using an index of 1 will get/set the option index, which is an integer value.

 

Please see the Notes On View Types And Indices section below for more information.

Enum (index = 0):

  1. 0 = Unknown/default
  2. (External / Chase and Showcase /

    Drone / Fixed / Environment states
    )
  3. 1 = Pilot View
  4. (Cockpit State)
  5. 2 = Instruments
  6. (Cockpit State)
  7. 3 = Quickview
  8. (Cockpit State)
  9. 4 = Quickview External
  10. (External State)
  11. 5 = View
  12. (Showcase / Drone / Fixed /

    Environment states
    )

or

Number (index = 1)

CAMERA VIEW TYPE AND INDEX MAX:index

This variable can get the number of option indices related to a specific camera view type. The index value supplied to the SimVar should be one of the camera view type Enum values (see CAMERA VIEW TYPE AND INDEX), and the SimVar will return the number of options available for that camera type (counting from 1, so - for example - if the camera view type is "Quickview" and has 8 quickview settings, then CAMERA VIEW TYPE AND INDEX MAX:4 will return 8). Note that this value can be set after a flight has started, but it will have no effect since the number of camera options is initilaised once only and not updated (and the simulation may overwrite the value again even after setting it).

 

Please see the Notes On View Types And Indices section below for more information.

Number
GAMEPLAY CAMERA FOCUS This gets/sets the focus for the camera zoom, which can be either manual, or auto. The setting affects both the Cockpit and the External (Chase) cameras.
The following SimVars can be used to get/set the level of zoom: COCKPIT_CAMERA_ZOOM or CHASE_CAMERA_ZOOM.

Enum:

  1. 0 = Auto
  2. 1 = Manual
IS CAMERA RAY INTERSECT WITH NODE This SimVar is used to check for a collision along a ray from the center of the user FOV and a model node. The available nodes that can be checked using this SimVar must be previously defined in the [CAMERA_RAY_NODE_COLLISION] of the cameras.cfg file. The SimVar requires a node index value between 1 and 10, corresponding to the node defined in the CFG file, and the SimVar will return 1 (TRUE) if there is a collision along the camera ray or 0 (FALSE) otherwise. You may also supply an index of 0 to perform a collision check for all defined nodes, in which case the SimVar will return 1 (TRUE) if there is a collision between the ray and any of the defined nodes. Supplying an index outside of the range of 1 to 10, or supplying an index for which no node has been defined, will return 0 (FALSE).  Bool

 

Notes On View Types And Indices

To help visualise what cameras are being accessed using the SimVar CAMERA_VIEW_TYPE_AND_INDEX, you can see them all in the "in-sim panel" UI for the camera, here:

Camera In-Sim Panel UIIn the image above, we're looking at the Cockpit camera panel (you can check or set this using the CAMERA_STATE SimVar), and this panel has 3 different camera view types: Pilot, Instrument and Quickview. To check or set which of these view types is being used, you would use the CAMERA_VIEW_TYPE_AND_INDEX using 0 for the camera type, and then you would use 1 for the option index within that category (note that options are counted from 0). For example:

CAMERA_VIEW_TYPE_AND_INDEX:0 = 2
CAMERA_VIEW_TYPE_AND_INDEX:1 = 3

This would be the following camera type and option:

In-Sim Camera Panel Instruments Type And OptionsIMPORTANT! If the camera type is 1 (for the Pilot view type), then the 4 default options will be indexed 1 (Close), 2 (Pilot), 4 (Landing), and 5 (Copilot), and the SimVar CAMERA_VIEW_TYPE_AND_INDEX_MAX will return +1 for the number of options (ie: 5 not 4 by default). This is due to the internal requirements of the code.

 

 

Chase (External) Cameras

Simulation Variable Description Units Settable
CHASE CAMERA HEADLOOK This is used to get/set the look state of the chase (external) camera. Note that this value will also affect the CAMERA_SUBSTATE value, when the CAMERA_STATE is set to 3 (External/Chase).

Enum:

  1. 1 = Freelook
  2. 2 = Headlook
CHASE CAMERA MOMENTUM Sets/gets the momentum modifier of the chase (external) camera, which is controls how fast/slow the camera will stop moving when no longer being moved by the user. Default is 50%. Percentage
CHASE CAMERA SPEED Sets/gets the translation speed modifier of the chase (external) camara, as a percentage. Default is 50%. Percentage
CHASE CAMERA ZOOM Sets/gets the zoom/FOV modifier for the chase (external) camera. Note that when setting this value, it will affect the camera regardless of whether the GAMEPLAY_CAMERA_FOCUS is set to manual or automatic. Default is 50%. Percentage
CHASE CAMERA ZOOM SPEED Sets/gets the speed modifier for when the zoom/FOV chase (external) camera changes zoom/FOV levels. Default is 50%. Percentage

 

 

Cockpit Cameras

Simulation Variable Description Units Settable
CAMERA ACTION COCKPIT VIEW RESET This can be used to reset the cockpit camera when the CAMERA_STATE is set to 2 (Cockpit). Essentially the same as the user pressing the default reset keys CTRL + Space. Bool
CAMERA ACTION COCKPIT VIEW SAVE:index This can be used to save a cockpit camera when the CAMERA_STATE is set to 2 (Cockpit). The index value given is the save "slot" that will be used, from 0 to 9. Essentially this is the same as the user pressing the default save keys CTRL + Alt + 0-9. Bool
COCKPIT CAMERA HEADLOOK This is used to get/set the look state of the cockpit camera. Note that this value will also affect the CAMERA_SUBSTATE value, when the CAMERA_STATE is set to 2 (Cockpit).

Enum:

  1. 1 = Freelook
  2. 2 = Headlook
COCKPIT CAMERA HEIGHT This can be used to get/set the cockpit camera height modifier expressed as a percentage. Default is 50%. Percentage
COCKPIT CAMERA INSTRUMENT AUTOSELECT This can be used to get or set the autoselect option for the cockpit camera when viewing the instruments (ie: the CAMERA_SUBSTATE is 5). When enabled the camera will move automatically if the player mouse reaches the edge of the screen and there are instrument panels available on that side. Bool
COCKPIT CAMERA MOMENTUM Sets/gets the momentum modifier of the cockpit camera, which is controls how fast/slow the camera will stop moving when no longer being moved by the user. Default is 50%. Percentage
COCKPIT CAMERA SIDE Not currently used in the simulation. Enum
COCKPIT CAMERA SPEED Sets/gets the translation speed modifier of the cockpit camara, as a percentage. Default is 50%. Percentage
COCKPIT CAMERA UPPER POSITION Sets/gets the current "upper position" cockpit camera toggle. When 1 (TRUE), the camera is is in the upper position, and when 0 (FALSE) it is in the default position. Bool
COCKPIT CAMERA ZOOM Sets/gets the zoom/FOV modifier for the cockpit camera. Note that when setting this value, it will affect the camera regardless of whether the GAMEPLAY_CAMERA_FOCUS is set to manual or automatic. Default is 50%. Percentage
COCKPIT CAMERA ZOOM SPEED Sets/gets the speed modifier for when the zoom/FOV cockpit camera changes zoom/FOV levels. Default is 50%. Percentage

 

 

Drone Cameras

Simulation Variable Description Units Settable
DRONE CAMERA FOCUS Sets/gets the focus modifier for the drone camera. Default is 50%, and a lower value will set the drone focus to things in the foreground and a higher level will set the drone focus to things in the background. Note that this is only taken into account when the DRONE_CAMERA_FOCUS_MODE is set to 3 (manual). Percentage
DRONE CAMERA FOCUS MODE Sets/gets the current drone focus mode. When set to 3 (manual), the focus position will be based on the DRONE_CAMERA_FOCUS value.

Enum:

  1. 1 = Deactivated
  2. 2 = Auto
  3. 3 = Manual
DRONE CAMERA FOLLOW Sets/gets the whether the drone camera is in follow mode or not. Bool
DRONE CAMERA FOV Sets/gets the zoom/FOV modifier for the drone camera. Default is 50%. Percentage
DRONE CAMERA LOCKED Sets/gets the whether the drone camera is locked or not. Bool
DRONE CAMERA SPEED ROTATION Sets/gets the rotation speed modifier of the drone camara, as a percentage. Default is 50%. Percentage
DRONE CAMERA SPEED TRAVELLING Sets/gets the translation speed modifier of the drone camara, as a percentage. Default is 50%. Percentage

 

 

Smart Cameras

Simulation Variable Description Units Settable
SMART CAMERA ACTIVE Sets/gets the whether the smart camera is active or not. Bool
SMART CAMERA INFO:index

Gets information on the smartcam system. The index sets what kind of information will be returned (or set):

  • 0 = Gets the number of smartcam targets in the smart camera list
  • 1 = Gets or sets the index of the currently selected smartcam target, counting from 0 (so index 0 is the first target in the list).
Number
SMART CAMERA LIST:index Retrieves the type of target for the indexed position in the smartcam list, counting from 0 (so index 0 is the first target in the list).

Enum:

  1. 0 = unknown POI
  2. 1 = Follow POI
  3. 2 = User POI
  4. 3 = General POI
  5. 4 = End OF Runway
  6. 5 = Landing Runway
  7. 6 = Flightpath
  8. 7 = Object Interaction
  9. 8 = Multiplayer OOI
  10. 9 = Active Runway
  11. 10 = Waypoint
  12. 11 = Airport OOI
  13. 12 = Flight Assistant Destination
SMART CAMERA LIST DESCRIPTION:index This returns a localized string that represents the smartcam target specified by the given index. Indices count from 0 so index 0 is the first target in the list. String