drawLine3D: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\|s([0-9])\= '''([^' ]+)'''([^ ]+) " to "|s$1= $2$3 ") |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
Line 6: | Line 6: | ||
|gr1= Interaction | |gr1= Interaction | ||
|descr= Draws a line of a given | |descr= Draws a line of a given colour between two 3D positions in the current frame. To be used mostly in a [[Arma 3: Mission Event Handlers#Draw3D|"Draw3D"]] [[addMissionEventHandler|mission event handler]]. | ||
|s1= [[drawLine3D]] [start, end, color] | |s1= [[drawLine3D]] [start, end, color] | ||
|p1= | |p1= start: [[PositionAGL]] | ||
|p2= | |p2= end: [[PositionAGL]] | ||
|p3= | |p3= color: [[Array]] format [[Color|Color (RGBA)]] | ||
|r1= [[Nothing]] | |r1= [[Nothing]] | ||
Line 24: | Line 22: | ||
};</code> | };</code> | ||
|seealso= [[drawIcon3D]] | |seealso= [[drawIcon3D]] [[ASLToAGL]] | ||
}} | }} | ||
{{Note | |||
|user= Killzone_Kid | |||
|timestamp= 20130831092700 | |||
|text= As the 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. | |||
<code>[[addMissionEventHandler]] ["Draw3D", { | <code>[[addMissionEventHandler]] ["Draw3D", { | ||
[[drawLine3D]] [<nowiki/>[[ASLToAGL]] [[eyePos]] soldier1, [[ASLToAGL]] [[eyePos]] soldier2, [1,0,0,1]]; | [[drawLine3D]] [<nowiki/>[[ASLToAGL]] [[eyePos]] soldier1, [[ASLToAGL]] [[eyePos]] soldier2, [1,0,0,1]]; | ||
}];</code> | }];</code> | ||
}} | |||
{{Note | |||
|user= Waffle SS. | |||
|timestamp= 20150218021000 | |||
|text= Visible through fog and past draw distance. | |||
}} | |||
Visible through fog and past draw distance. | |||
Revision as of 18:37, 24 November 2021
Description
- Description:
- Draws a line of a given colour between two 3D positions in the current frame. To be used mostly in a "Draw3D" mission event handler.
- Groups:
- Interaction
Syntax
- Syntax:
- drawLine3D [start, end, color]
- Parameters:
- start: PositionAGL
- end: PositionAGL
- color: Array format Color (RGBA)
- Return Value:
- Nothing
Examples
- Example 1:
onEachFrame { drawLine3D [getPos player, getPos cursorTarget, [1,1,1,1]]; };
Additional Information
- See also:
- drawIcon3D ASLToAGL
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 Aug 31, 2013 - 09:27 (UTC)
-
As the 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 Feb 18, 2015 - 02:10 (UTC)
- Visible through fog and past draw distance.