MIST getAvgPoint

From DCS World Wiki - Hoggitworld.com


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, 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