Skip to content

debug_overlay#

add_box#

Renders a debug box around the the specified position

void add_box(<vec3_t> pos, <vec3_t> mins, <vec3_t> maxs, <angle_t> orientation, <color_t> color, <float> duration)
Fields Description
pos
vec3_t
world position
mins
vec3_t
box mins
maxs
vec3_t
box maxs
orientation
angle_t
orientation
color
color_t
box color
duration
float
box duration

Example

debug_overlay.add_box(pos, mins, maxs, orientation, color_t(255, 255, 255), 1.0)

add_sphere#

Renders a debug sphere around the the specified position

void add_sphere(<vec3_t> pos, <float> radius, <int> theta, <int> phi, <color_t> color, <float> duration)
Fields Description
pos
vec3_t
world position
radius
float
sphere radius
theta
int
phi
int
color
color_t
sphere color
duration
float
sphere duration

Example

local local_player = entity_list.get_local_player()
local abs_origin = local_player:get_prop("m_vecAbsOrigin")
debug_overlay.add_sphere(abs_origin, 15, 20, 5, color_t(255, 255, 255), 1.0)

add_line#

Renders a debug line between two points

void add_line(<vec3_t> start, <vec3_t> end, <color_t> color, <bool> skip_occlusion, <float> duration)

Fields Description
start
vec3_t
point start
end
vec3_t
point end
color
color
line color
skip_occlusion
bool
should the line be occluded

Example

local local_player = entity_list.get_local_player()
local abs_origin = local_player:get_prop("m_vecAbsOrigin")
debug_overlay.add_line(abs_origin, abs_origin + vec3_t(10, 0, 0), color_t(255, 255, 255), true, 5.0)

add_capsule#

Renders a debug capsule

void add_capsule(<vec3_t> mins, <vec3_t> maxs, <float> radius, <color_t> color, <bool> skip_occlusion, <float> duration)

Fields Description
mins
vec3_t
capsule minimum bounds
maxs
vec3_t
capsule maximum bounds
radius
float
capsule size
color
color
capsule color
skip_occlusion
bool
should the capsule be occluded
duration
float
render time of capsule

Example

local local_player = entity_list.get_local_player()
local abs_origin = local_player:get_render_origin()
debug_overlay.add_capsule(abs_origin, abs_origin + vec3_t(10, 0, 0), 10.f, color_t(255, 255, 255), true, 5.0)