drawLine3D: Difference between revisions
Jump to navigation
Jump to search
Killzone Kid (talk | contribs) No edit summary |
Killzone Kid (talk | contribs) No edit summary |
||
Line 7: | Line 7: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| Draws a line of a given color between two 3D positions. | | Draws a line of a given color between two 3D positions. Command has to be executed each frame. Use [[onEachFrame]] or [[addMissionEventHandler]] "Draw3D". |= Description | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
Line 23: | Line 23: | ||
|x1= <code>[[drawLine3D]] <nowiki>[</nowiki>[[getPos]] | |x1= <code>[[onEachFrame]] { | ||
[[drawLine3D]] <nowiki>[</nowiki>[[getPos]] [[player]], [[getPos]] [[cursorTarget]], [1,1,1,1]]; | |||
};</code>|= EXAMPLE1 | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
Line 37: | Line 39: | ||
<dd class="notedate">Posted on August 31, 2013 | <dd class="notedate">Posted on August 31, 2013 | ||
<dt class="note">'''[[User:Killzone_Kid|Killzone_Kid]]''' | <dt class="note">'''[[User:Killzone_Kid|Killzone_Kid]]''' | ||
<dd class="note">As command syntax indicates, this command expects starting and ending position in format [[Position]] meaning that over the land it expects [[PositionATL]] and over the sea [[PositionASL]]. Use additional [[ASLToATL]] and [[ATLToASL]] commands wherever is necessary. | <dd class="note">As command syntax indicates, this command expects starting and ending position in format [[Position]] meaning that over the land it expects [[PositionATL]] and over the sea [[PositionASL]]. Use additional [[ASLToATL]] and [[ATLToASL]] commands wherever is necessary. Alternatively use [[getPos]] or [[position]] commands, which will automatically adjust Z. | ||
<code>[[drawLine3D]] <nowiki>[</nowiki>[[ASLToATL]] [[eyePos]] soldier1, [[ASLToATL]] [[eyePos]] soldier2, [1,0,0,1]]</code> | <code>[[addMissionEventHandler]] ["Draw3D", { | ||
[[drawLine3D]] <nowiki>[</nowiki>[[ASLToATL]] [[eyePos]] soldier1, [[ASLToATL]] [[eyePos]] soldier2, [1,0,0,1]]; | |||
}];</code> | |||
Revision as of 08:52, 31 August 2013
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:
- Uncategorised
Syntax
- Syntax:
- drawLine3D [start, end, color]
- Parameters:
- [start, end, color]: Array
- start: Position
- end: Position
- color: Color
- 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 Position meaning that over the land it expects PositionATL and over the sea PositionASL. Use additional ASLToATL and ATLToASL commands wherever is necessary. Alternatively use getPos or position commands, which will automatically adjust Z.
addMissionEventHandler ["Draw3D", { drawLine3D [ASLToATL eyePos soldier1, ASLToATL eyePos soldier2, [1,0,0,1]]; }];