Jump to content

ConvertVec3ToVec2

From CMM Wiki
Return to CMM Command Reference
Environment: Mission Scripting
Function: ConvertVec3ToVec2
Function Description: Converts a 3D vector table into a 2D vector table by extracting the x and z values from the input, returning a vec2 with x and y values where y is set to z.
File Location: cmm.positionFunctions.lua
Syntax: CMM.ConvertVec3ToVec2( table vec3 )
Return Value: table
Parameters: Name Description
vec3Table representing a vec3 with x, y, and z values; all components must be numbers.
Example: CMM.ConvertVec3ToVec2({x = 10, y = 20, z = 30})
Example Description: Converts a 3D vector with x, y, and z values into a 2D vector by returning {x = 10, y = 30}.
Related Functions:
Notes: