Garry's Mod Wiki

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.
These function appear to not work in singleplayer

Methods

void 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
void debugoverlay.Box( Vector origin, Vector mins, Vector maxs, number lifetime = 1, table color = Color( 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.
void debugoverlay.BoxAngles( Vector pos, Vector mins, Vector maxs, Angle ang, number lifetime = 1, table color = Color( 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.
void 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.
void 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.
void debugoverlay.Grid( Vector position )
Draws a 3D grid of limited size in given position. This function will silently fail if the **developer** ConVar is set to 0.
void 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.
void 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.
void 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.
void 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 verices. This function will silently fail if the **developer** ConVar is set to 0.
void debugoverlay.Text( Vector origin, string text, number lifetime = 1, boolean viewCheck = false )
Displays text at the specified position. This function will silently fail if the **developer** ConVar is set to 0.
void 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.

Page Links


Special Pages


Wikis

?

Render Time: 23ms

Session 0
DB GetPage 2
Generate Html 2
SaveChanges 10
Render Body 0
Render Sidebar 6