drawLine3D: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "_{10,} " to "") |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments( \("local" or "global"\))?|Effects|Multiplayer Effects( \("local" or "global"\))?|Multiplayer Exe...) |
||
Line 1: | Line 1: | ||
{{Command | {{Command | ||
| arma3 | | arma3 | ||
|0.50 | |0.50 | ||
|gr1= Interaction | |gr1= Interaction | ||
| Draws a line of a given color between two 3D positions. Command has to be executed each frame. Use [[onEachFrame]] or [[addMissionEventHandler]] "Draw3D". | | Draws a line of a given color between two 3D positions. Command has to be executed each frame. Use [[onEachFrame]] or [[addMissionEventHandler]] "Draw3D". | ||
| '''drawLine3D''' [start, end, color] | | '''drawLine3D''' [start, end, color] | ||
|p1= [start, end, color]: [[Array]] | |p1= [start, end, color]: [[Array]] | ||
|p2= start: [[PositionAGL]] | |p2= start: [[PositionAGL]] | ||
|p3= end: [[PositionAGL]] | |p3= end: [[PositionAGL]] | ||
|p4= color: [[Color|Color (RGBA)]] | |p4= color: [[Color|Color (RGBA)]] | ||
| [[Nothing]] | | [[Nothing]] | ||
|x1= <code>[[onEachFrame]] { | |x1= <code>[[onEachFrame]] { | ||
[[drawLine3D]] [<nowiki/>[[getPos]] [[player]], [[getPos]] [[cursorTarget]], [1,1,1,1]]; | [[drawLine3D]] [<nowiki/>[[getPos]] [[player]], [[getPos]] [[cursorTarget]], [1,1,1,1]]; | ||
};</code> | };</code> | ||
| [[drawIcon3D]] | | [[drawIcon3D]] | ||
| |MPBEHAVIOUR= | | |MPBEHAVIOUR= |
Revision as of 00:37, 18 January 2021
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
Notes
- 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]]; }];
Bottom Section
- Posted on February 18, 2015 - 02:10 (UTC)
- Waffle SS.
- Visible through fog and past draw distance.