debug_draw¶
A global table of functions: debug_draw.<function>(…).
Debug drawing for Luau scripts, as the global table debug_draw: lines and shapes that last one frame, drawn over the world. Call them every frame (from a system, or from the devtools.on_gui function) for as long as they should show. Colors are vectors of red, green and blue from 0 to 1; without one a line is white. Positions are the world's. With nowhere to draw (no renderer) the calls do nothing.
line¶
debug_draw.line: (from: Vector3, to: Vector3, color: any) -> ()
A line from one point to another.
box¶
debug_draw.box: (center: Vector3, halfExtents: Vector3, color: any) -> ()
The edges of the box that has center and reaches half_extents from it along the axes.
sphere¶
debug_draw.sphere: (center: Vector3, radius: number, color: any) -> ()
A sphere as three circles.
arrow¶
debug_draw.arrow: (from: Vector3, to: Vector3, color: any) -> ()
A line with an arrow head at to.
axes¶
debug_draw.axes: (origin: Vector3, length: number?) -> ()
The three axes at a point, each length long: X red, Y green, Z blue.