Wednesday, June 25, 2025

Godot Debug Draw 3D Add-On – GameFromScratch.com

Right this moment we’re Debug Draw 3D, a should have extension for Godot builders. It’s applied in C++ utilizing GDExtensions and is usable with C# and GDScript. It allows builders to rapidly and simply draw strains, shapes and textual content on display, making debug (thus the identify) visualization a breeze. It’s applied as a pair of singletons, DebugDraw2D and DebugDraw3D, in addition to quite a few configuration and supporting lessons.

Debug Draw 3D is able to drawing the next:

Debug Draw 3D (4.2.2+)'s icon

Debug Draw 3D (4.2.2+) 1.5.1 3D Instruments 4.2 Neighborhood

Submitted by consumer Dmitriysalnikov; WITH; 2025-05-27

That is an add-on for debug drawing in 3D and for some 2D overlays, which is written in C++ and can be utilized with GDScript.

= Options =
3D:
* Arrow
* Billboard opaque sq.
* Field
* Digicam slice
* Cylinder
* Gizmo
* Grid
* Line
* Line Path
* Line with Arrow
* Airplane
* Factors
* Place 3D (3 crossing axes)
* Sphere
* 3D Textual content

Overlay:
* Textual content (with grouping and coloring)

A easy instance:

func _process(delta: float) -> void:
    var _time = Time.get_ticks_msec() / 1000.0
    var box_pos = Vector3(0, sin(_time * 4), 0)
    var line_begin = Vector3(-1, sin(_time * 4), 0)
    var line_end = Vector3(1, cos(_time * 4), 0)

    DebugDraw3D.draw_box(box_pos, Quaternion.IDENTITY, Vector3(1, 2, 1), Colour(0, 1, 0))
    DebugDraw3D.draw_line(line_begin, line_end, Colour(1, 1, 0))
    DebugDraw2D.set_text("Time", _time)
    DebugDraw2D.set_text("Frames drawn", Engine.get_frames_drawn())
    DebugDraw2D.set_text("FPS", Engine.get_frames_per_second())
    DebugDraw2D.set_text("delta", delta)

Key Hyperlinks

Debug Draw 3D Godot Asset Retailer Web page

GitHub Repository

Documentation

You possibly can be taught extra concerning the Debug Draw 3D extension for the Godot sport engine and see it in motion within the video beneath.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles