Targetware: Flight Model Development


Targetware ACM File Guide

PART REFERENCE: Crew

Every crew position on an aircraft should be defined in it's own part. At a minimum, you must provide for at least one crew position, that of the pilot. Each crew position comes with it's own view point, and optionally, pre-defined view angles and gunsight views.

Each crew position has a specific function, "crew", "pilot", "bombadier", "gunner". If jumping to a position provides no particular benefit to the player, you may wish to disable jumping by setting the "selectable" line to 0. The crew members mass will still affect the FM, but the player won't be able to jump to that spot. The functionality available to me player once in position will depend on the position type, as defined below:

function = pilot
selectable = 0/1

Each position also has the usual physics settings associated with it:

mass = kg
critical = 0/1
parent = <name>
location = x, y, z
size = x, y, z

Since some planes have different cockpit designs that affect a human's ability resist blacking out at high G-forces, the crew member's G-tolerance for each position can be set by:

g_limit = negative, positive

In any crew position, the crew member can move his/her eyes around within the physical boundaries of the cockpit as well as within physical human limits.  The angles in degrees, determine the limit of eye movement in the left/right and up/down directions with negatives values being left and down. A separate set of angles can be established to control when a padlock view is broken. This would be useful if a pilot could physically turn and look backwards, but because of the structure of the cockpit, his view would be blocked out sooner than it would with a bubbletop style cockpit.

The pilot's viewpoint and view direction in relation to the origin is defined by:

viewpoint = x, y, z
view_angle = heading, pitch

head_min_angles = -165, -90
head_max_angles = 165, 90
padlock_min_angles = -165, -45
padlock_max_angles = 165, 90

Likewise, head movement is limited by the cockpit dimensions:

head_min_pos = left_x, aft_y, down_z
head_max_pos = right_x, forward_y, up_z

Each plane can have any number of preset cockpit views, which will be used by players to check instruments throughout the aircraft.

num_cockpit_views = 2

One might be set to look down at the main panel, one to see the throttle quadrant, one to see a sub panel on the right side, etc. The actual views are defined in one or more sets of "cockpit_view_N_" lines, where "N" is the view number being defined:


#main instrument panel
cockpit_view_1_position = 0,0,0
cockpit_view_1_angle = 0,-30
cockpit_view_1_fov = 50

#throttle quadrant and fuel gauges
cockpit_view_2_position = 0,0,0
cockpit_view_2_angle = -45,-60
cockpit_view_2_fov = 45

In this example, we have only created one cockpit view, which happens to look ahead, down at a 30 degree angle, and uses a Field of View of 50 degrees. Cockpit views will need to be created and tweaked for each crew position depending on how instruments are arranged in the cockpit.

If no cockpit views are defined, a default of 0,0,0 position, 0,-30 angles, and 45 degree FOV will be used.

Each crew position may also have one optional view assigned to the gunsight. This is useful mainly for aircraft with gunsights that are offset from center, or that have telescopic gunsights, needing the players eye to be in an exact spot, and featuring a built-in "zoom". Here is some sample code an optical gunsight offset 50mm to the right of center:

gunsight_view_position = 0.05, 0, 0
gunsight_view_angle = 0, 0
gunsight_view_fov = 90