drawLine3D: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\| *(arg|eff|mp|serverExec|gr[0-9]) *= *(.*) * *\|([^=0-9]{12})" to "|$1=$2 |descr=$3")
m (Text replacement - "\| *arma3 * * *\| *([0-2]\.[0-9]{2}) * " to "|game1= arma3 |version1= $1 ")
Line 1: Line 1:
{{RV|type=command
{{RV|type=command


| arma3
|game1= arma3
 
|version1= 0.50
|0.50


|gr1= Interaction
|gr1= Interaction

Revision as of 23:14, 13 June 2021

Hover & click on the images for description

Description

Description:
Draws a line of a given color between two 3D positions. Command has to be executed each frame. Use onEachFrame or addMissionEventHandler "Draw3D".
Groups:
Interaction

Syntax

Syntax:
drawLine3D [start, end, color]
Parameters:
[start, end, color]: Array
start: PositionAGL
end: PositionAGL
color: Color (RGBA)
Return Value:
Nothing

Examples

Example 1:
onEachFrame { drawLine3D [getPos player, getPos cursorTarget, [1,1,1,1]]; };

Additional Information

See also:
drawIcon3D

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
Posted on August 31, 2013
Killzone_Kid
As command syntax indicates, this command expects starting and ending position in format PositionAGL meaning that over the land it expects PositionATL and over the sea PositionASLW. Use additional ASLToAGL and AGLToASL commands wherever is necessary. addMissionEventHandler ["Draw3D", { drawLine3D [ASLToAGL eyePos soldier1, ASLToAGL eyePos soldier2, [1,0,0,1]]; }];
Posted on February 18, 2015 - 02:10 (UTC)
Waffle SS.
Visible through fog and past draw distance.