A simple C++ module that adds debug drawing functions into Godot Engine, like Unity's Debug.DrawLine
and UE4's DrawDebugLine
.
- Godot: https://godotengine.org
Currently, the following functions are supported:
line(a, b, color, width = 1, duration = 0)
for a simple linecircle(position, radius, color, duration = 0)
for a filled circlerect(rect, color, width = 1, duration = 0)
for a hollow rectanglearea(rect, color, duration = 0)
for a filled rectangle
All functions have an optional duration parameter that indicates how long they should stay on screen. The default value of 0 means a single frame.
Call DebugDraw.line()
from anywhere.
Include "modules/debugdraw/debugdraw.h"
and call DebugDraw::get_singleton()->line(...)
.
- Clone the contents of this repository into
<Your Godot source folder>/modules/debugdraw
- Please note that this project is meant to be used with Godot's 2.1 branch.
- Build and run Godot normally
Released under the MIT License.