debugoverlay
The debugoverlay library is mainly useful for 3D debugging, it can be used to draw shapes on the screen for debug purposes.
These functions will not do anything unless the developer console variable is set to non 0.
Methods
debugoverlay.Axis( Vector origin, Angle ang, number size, number lifetime = 1, boolean ignoreZ = false )
Displays an axis indicator at the specified position.
This function will silently fail if the developer ConVar is set to 0.
It is not networked to clients, except for the listen server host.
It will not work when the game is paused.
debugoverlay.Box( Vector origin, Vector mins, Vector maxs, number lifetime = 1, table color = Color( 255, 255, 255, 255 ) )
Displays a solid coloured box at the specified position.
This function will silently fail if the developer ConVar is set to 0.
It is not networked to clients, except for the listen server host.
It will not work when the game is paused.
debugoverlay.BoxAngles( Vector pos, Vector mins, Vector maxs, Angle ang, number lifetime = 1, table color = Color( 255, 255, 255, 255 ) )
Displays a solid colored rotated box at the specified position.
This function will silently fail if the developer ConVar is set to 0.
It is not networked to clients, except for the listen server host.
It will not work when the game is paused.
debugoverlay.Cross( Vector position, number size, number lifetime = 1, table color = Color( 255, 255, 255 ), boolean ignoreZ = false )
Creates a coloured cross at the specified position for the specified time.
This function will silently fail if the developer ConVar is set to 0.
It is not networked to clients, except for the listen server host.
It will not work when the game is paused.
debugoverlay.EntityTextAtPosition( Vector pos, number line, string text, number lifetime = 1, table color = Color( 255, 255, 255 ) )
Displays 2D text at the specified coordinates.
This function will silently fail if the developer ConVar is set to 0.
It is not networked to clients, except for the listen server host.
It will not work when the game is paused.
Draws a 3D grid of limited size in given position.
This function will silently fail if the developer ConVar is set to 0.
It is not networked to clients, except for the listen server host.
It will not work when the game is paused.
debugoverlay.Line( Vector pos1, Vector pos2, number lifetime = 1, table color = Color( 255, 255, 255 ), boolean ignoreZ = false )
Displays a coloured line at the specified position.
This function will silently fail if the developer ConVar is set to 0.
It is not networked to clients, except for the listen server host.
It will not work when the game is paused.
debugoverlay.ScreenText( number x, number y, string text, number lifetime = 1, table color = Color( 255, 255, 255 ) )
Displays text triangle at the specified coordinates.
This function will silently fail if the developer ConVar is set to 0.
It is not networked to clients, except for the listen server host.
It will not work when the game is paused.
debugoverlay.Sphere( Vector origin, number size, number lifetime = 1, table color = Color( 255, 255, 255 ), boolean ignoreZ = false )
Displays a coloured sphere at the specified position.
This function will silently fail if the developer ConVar is set to 0.
It is not networked to clients, except for the listen server host.
It will not work when the game is paused.
debugoverlay.SweptBox( Vector vStart, Vector vEnd, Vector vMins, Vector vMaxs, Angle ang, number lifetime = 1, table color = Color( 255, 255, 255 ) )
Displays "swept" box, two boxes connected with lines by their vertices.
This function will silently fail if the developer ConVar is set to 0.
It is not networked to clients, except for the listen server host.
It will not work when the game is paused.
Displays text at the specified position.
This function will silently fail if the developer ConVar is set to 0.
It is not networked to clients, except for the listen server host.
It will not work when the game is paused.
debugoverlay.Triangle( Vector pos1, Vector pos2, Vector pos3, number lifetime = 1, table color = Color( 255, 255, 255 ), boolean ignoreZ = false )
Displays a colored triangle at the specified coordinates.
This function will silently fail if the developer ConVar is set to 0.
It is not networked to clients, except for the listen server host.
It will not work when the game is paused.