MIST getHeadingPoints

From DCS World Wiki - Hoggitworld.com


Added with: Mist 4.5
Returns the heading from the first point to the second point. If the optional corrected value is passed then the heading will be corrected for any north offset. Use this optional value if you are giving a heading direction for a player to follow with their avionics. Do not pass it if you are using this function to get the orientation for AI.
number mist.utils.getHeadingPoints(table point1 ,table point2 , boolean corrected )
Valid Input Values:
point1 = vec2 or vec3

point2 = vec2 or vec3

Return value:
Return example:
Usage Examples:
The following example could be used when spawning a JTAC so that it is facing toward the group it is setup to designate.
      heading = mist.utils.getHeadingPoints(jtacPoint, targetPoint)
Related Functions
add, sub, scalar_mult, dp, cp, mag, getUnitVec, rotateVec2, get2DDist, get3DDist, getHeadingPoints

Scripting Engine

MIST Root Page