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 |
|---|---|
posvec3_t |
world position |
minsvec3_t |
box mins |
maxsvec3_t |
box maxs |
orientationangle_t |
orientation |
colorcolor_t |
box color |
durationfloat |
box duration |
Example
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 |
|---|---|
posvec3_t |
world position |
radiusfloat |
sphere radius |
thetaint |
|
phiint |
|
colorcolor_t |
sphere color |
durationfloat |
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
| Fields | Description |
|---|---|
startvec3_t |
point start |
endvec3_t |
point end |
colorcolor |
line color |
skip_occlusionbool |
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
| Fields | Description |
|---|---|
minsvec3_t |
capsule minimum bounds |
maxsvec3_t |
capsule maximum bounds |
radiusfloat |
capsule size |
colorcolor |
capsule color |
skip_occlusionbool |
should the capsule be occluded |
durationfloat |
render time of capsule |