MIST makeVec2

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


mist.utils.makeVec2

Added with: Mist 1.0
Description
This function takes a Vec3 table and returns it as a Vec2 table
Syntax
vec2 mist.utils.makeVec2(table vec3 )
Valid Input Values:
vec3
Return value:
vec2
Return example:
vec2
Usage Examples:
local function isFeetWet(unit)
local point = mist.utils.makeVec2(Unit.getByName(unit):getPosition().p
local surfType= land.getSurfaceType(point)
if surfType == 3 then
return 'Feet Wet'
else
return 'Feet Dry'
end
end


Notes:
Related Functions
makeVec2, makeVec3, zoneToVec3, makeVec3GL, vecToWP, unitToWP

Scripting Engine

MIST Root Page