Drawcross: Difference between revisions
Jump to navigation
Jump to search

Tip:clear_debug_overlays command doesn't clear these lines but it's possible to hide them by issuing
(Created page with "{{This is a|console command|name=drawcross}} It draws a cross using 4 lines. If a line intersects solid it's show red otherwise white. Maximum number of lines active at once is 20 so 5 crosses are possible at a given time. To clear all lines it's possible by issuing 20 {{cmd|drawline|0 0 0 0 0 0}} 20 times <code>alias e drawline 0 0 0 0 0 0;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e</code> == See also == * {{cmd|drawline}}") |
No edit summary |
||
(18 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{This is a|console command|name=drawcross}} | {{LanguageBar|title = {{mono|drawcross / drawline}}}} | ||
[[File:Drawcross-example-hls.jpg|right|thumb|Drawcross used to show locations of {{ent|world_items|engine=source}} in {{hls|2}}.]] | |||
[[File:Drawline-concommand-example.jpg|right|thumb|Drawline used to show it's white when LOS is not blocked and otherwise red]] | |||
{{This is a|console command|name=drawcross|name1=drawline|notitlechange=1}} Creates lines or crosses. Cross consists of 4 lines and there are [https://github.com/ValveSoftware/source-sdk-2013/blob/61ca3f725417d5b479824cded09eaab1909151be/src/game/server/ndebugoverlay.cpp#L26 20 lines possible] to be drawn at once (i.e. 5 crosses, or 4 crosses and 4 lines, 3 crosses and 8 lines etc.). The lines they draw are red if intersecting with something that blocks line of sight otherwise white. | |||
{{tip|clear_debug_overlays command doesn't clear these lines but it's possible to hide them by issuing <code>drawline</code> 20 times. It's possible to {{cmd|alias}} it as follows for quick way to clear them. clear_debug_overlays is autocomplete by console and adding 2 at the end is fast. | |||
<pre>alias e drawline; | |||
alias clear_debug_overlays2 "e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e" | |||
</pre>}} | |||
=== Examples === | |||
* <code>drawcross 152 366 487</code> | |||
* <code>drawline 100 200 130 500 -650 142</code> | |||
== See also == | == See also == | ||
* {{cmd| | * {{cmd|box (console command)|alt=box|x1 y1 z1 x2 y2 z2}} - different overlay type clearable by clear_debug_overlays | ||
* {{cmd|cast_ray|alt=cast_ray / cast_hull}} | |||
== External links == | |||
* [https://github.com/ValveSoftware/source-sdk-2013/blob/61ca3f725417d5b479824cded09eaab1909151be/src/game/server/client.cpp#L702-L730 drawcross definition] | |||
* [https://github.com/ValveSoftware/source-sdk-2013/blob/61ca3f725417d5b479824cded09eaab1909151be/src/game/server/client.cpp#L681-L695 drawline definition] |
Latest revision as of 02:54, 12 May 2025


drawcross
and drawline
are console commands available in all Source games. Creates lines or crosses. Cross consists of 4 lines and there are 20 lines possible to be drawn at once (i.e. 5 crosses, or 4 crosses and 4 lines, 3 crosses and 8 lines etc.). The lines they draw are red if intersecting with something that blocks line of sight otherwise white.

drawline
20 times. It's possible to alias it as follows for quick way to clear them. clear_debug_overlays is autocomplete by console and adding 2 at the end is fast.
alias e drawline; alias clear_debug_overlays2 "e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e;e"
Examples
drawcross 152 366 487
drawline 100 200 130 500 -650 142
See also
- box x1 y1 z1 x2 y2 z2 - different overlay type clearable by clear_debug_overlays
- cast_ray / cast_hull