MIST getHeading

From DCS World Wiki - Hoggitworld.com
Revision as of 22:57, 13 April 2018 by Grimes (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


mist.getHeading

Added with: Mist 1.0
Description
Returns the value of the specified unit heading in radians
Syntax
number mist.getHeading(Unit unit , boolean Cartesian )
Valid Input Values:
unit = Unit Object
Return value:
number
Return example:
0.17
Usage Examples:

do

local myUnit = Unit.getByName('unitsName')
local heading = mist.getHeading(myUnit)

end

Notes:
optional variable added with mist 3.4

The mission editor uses a solely a Cartesian coordinate system while the game world displays some data in Latitude and Longitude. Heading directions will not likely match between these two coordinates. Use the optional variable if you are spawning AI or objects to be in a certain orientation. Do not use the optional variable if you want to use the compass heading of a given unit in game.

Related Functions
getHeading, getNorthCorrection, getAttitude, getPitch, getRoll, getYaw, getAoA, getClimbAngle, getDir

Scripting Engine

MIST Root Page