MakeVec2

From Hoggit: DCS World Multiplayer
Jump to: navigation, search


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