Difference between revisions of "MIST makeVec3"

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

Latest revision as of 23:21, 13 April 2018


mist.utils.makeVec3

Added with: Mist 1.0
Description
This function takes a Vec2 table and returns it as a Vec3 table. The y variable is optional and it specifies the altitude to be used in the vec3 table. If y is not set the value defaults to 0
Syntax
vec3 mist.utils.makeVec3(table vec2 , number y )
Valid Input Values:
vec2
Return value:
vec3
Return example:
vec3
Usage Examples:

do

local point = mist.utils.makeVec3(Unit.getByName('myUnit'):getPosition().p
local surfType= and.getSurfaceType(point)

end

Notes:
With mist 4.1 this function now supports being passed a WP table {x, y, alt} as the first value.
Related Functions
makeVec2, makeVec3, zoneToVec3, makeVec3GL, vecToWP, unitToWP

Scripting Engine

MIST Root Page