Difference between revisions of "MIST makeVec2"

From DCS World Wiki - Hoggitworld.com
 
(No difference)

Latest revision as of 06:25, 12 April 2018


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