drawLine3D: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "<code>([^<]*)\[\[([a-zA-Z][a-zA-Z0-9_]+)\]\]([^<]*)<\/code>" to "<code>$1$2$3</code>") |
Lou Montana (talk | contribs) m (Text replacement - "<sqf>([^↵][^\/]*↵[^\/]*)<\/sqf>" to "<sqf> $1 </sqf>") |
||
(7 intermediate revisions by 3 users not shown) | |||
Line 5: | Line 5: | ||
|gr1= Interaction | |gr1= Interaction | ||
|eff= local | |||
|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]]. | |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, width] | ||
|p1= start: [[Array]] format [[Position#PositionAGL|PositionAGL]] | |p1= start: [[Array]] format [[Position#PositionAGL|PositionAGL]] | ||
Line 15: | Line 17: | ||
|p3= color: [[Array]] format [[Color|Color (RGBA)]] | |p3= color: [[Array]] format [[Color|Color (RGBA)]] | ||
|p4= width: [[Number]] - (Optional, default 3) | |||
|p4since= arma3 2.18 | |||
|r1= [[Nothing]] | |r1= [[Nothing]] | ||
|x1= < | |x1= <sqf> | ||
drawLine3D [getPos | onEachFrame { | ||
};</ | drawLine3D [getPos player, getPos cursorTarget, [1,1,1,1]]; | ||
}; | |||
</sqf> | |||
|seealso= [[drawIcon3D]] [[ASLToAGL]] | |seealso= [[drawIcon3D]] [[ASLToAGL]] | ||
Line 30: | Line 37: | ||
|text= As the command syntax indicates, this command expects starting and ending position in format [[Position#PositionAGL|PositionAGL]] meaning that over the land it expects [[Position#PositionATL|PositionATL]] and over the sea [[Position#PositionASLW|PositionASLW]]. Use additional [[ASLToAGL]] and [[AGLToASL]] commands wherever is necessary. | |text= As the command syntax indicates, this command expects starting and ending position in format [[Position#PositionAGL|PositionAGL]] meaning that over the land it expects [[Position#PositionATL|PositionATL]] and over the sea [[Position#PositionASLW|PositionASLW]]. Use additional [[ASLToAGL]] and [[AGLToASL]] commands wherever is necessary. | ||
< | <sqf> | ||
drawLine3D [ASLToAGL | addMissionEventHandler ["Draw3D", { | ||
}];</ | drawLine3D [ASLToAGL eyePos soldier1, ASLToAGL eyePos soldier2, [1,0,0,1]]; | ||
}]; | |||
</sqf> | |||
}} | }} | ||
Latest revision as of 11:34, 3 September 2024
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, width]
- Parameters:
- start: Array format PositionAGL
- end: Array format PositionAGL
- color: Array format Color (RGBA)
- since 2.18
- width: Number - (Optional, default 3)
- Return Value:
- Nothing
Examples
- Example 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.
- Posted on Nov 25, 2021 - 21:37 (UTC)
- Caveat: lines invisible through MH-9 helicopter windows, see https://feedback.bistudio.com/T66225