Jump to content

DrawArrow

From CMM Wiki
Return to CMM Command Reference
Environment: Mission Scripting
Function: DrawArrow
Function Description: Draws a directional arrow marker between two world positions, consisting of a shaft and an optional head defined by supplied parameters.
File Location: cmm.drawFunctions.lua
Syntax: CMM.DrawArrow( table ArrowPointVec3 , table ArrowNockVec3 , table ArrowParams , table colour , table colourFill , number pointOffset ,number nockOffset )
Return Value: table
Parameters: Name Description
ArrowPointVec3Position (vec3) of the arrow tip.
ArrowNockVec3Position (vec3) of the arrow base.
ArrowParamsTable with three numbers {ArrowHeadLength, ArrowHeadWidth, ShaftThickness}.
colourRGBA outline colour ({r,g,b,a}).
colourFillRGBA fill colour ({r,g,b,a}).
pointOffsetOptional distance in metres from the tip to move the arrow.
nockOffsetOptional distance in metres from the base to move the arrow.
Example: CMM.DrawArrow({x=0,y=0,z=0}, {x=10000,y=0,z=0}, {4000,2000,500}, {1,0,0,0.9}, {1,0,0,0.4})
Example Description: Draws a red arrow pointing from the point at (10 km, 0, 0) back to the origin.
Related Functions:
Notes: