MIST getAvgPoint

From DCS World Wiki - Hoggitworld.com
Revision as of 22:49, 13 April 2018 by Grimes (talk | contribs) (Grimes moved page Mist getAvgPoint to MIST getAvgPoint without leaving a redirect: Slight Rename)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Added with: Mist 4.1
Returns the average position of the passed points within a table. Passed points can be vec2, vec3, or in WP format.
table mist.utils.getAvgPoint(table points )
Valid Input Values:
table with vec2/3 or WP tables indexed numerically

{1 = vec3, 2 = vec3}

Return value:
Return example:
vec3 {x, y, z}
Usage Examples:
A script adds the impact point of weapons to a table.

local avgHitPos = mist.getAvgPoint(impactingTableHere)

Functionally similar to mist.getAvgPos.
Related Functions
makeUnitTable, getRandPointInCircle, getRandomPointInZone, getRandomPointInPoly, isTerrainValid, terrainHeightDiff, getUnitsInZones, getUnitsInMovingZones, pointInPolygon, getUnitsInPolygon, getDeadMapObjsInZones, getDeadMapObjsInPolygonZone, getUnitsLOS, random, randomizeNumTable, getAvgPoint, getQFE, getWindBearingAndVel, getPathLength, getPathInSegments, getPointAtDistanceOnPath, projectPoint, getGroupsByAttribute, , getUnitsByAttribute, mapValue,

Scripting Engine

MIST Root Page