MIST getHeadingPoints
From DCS World Wiki - Hoggitworld.com
mist.utils.getHeadingPoints
Added with: Mist 4.5 |
Description |
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. |
Syntax |
number mist.utils.getHeadingPoints(table point1 ,table point2 , boolean corrected ) |
Valid Input Values: |
point1 = vec2 or vec3
point2 = vec2 or vec3 |
Return value: |
number |
Return example: |
1.34674373 |
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) |
Notes: |
Related Functions |
add, sub, scalar_mult, dp, cp, mag, getUnitVec, rotateVec2, get2DDist, get3DDist, getHeadingPoints |