Thursday, June 12, 2025
HomeGame DevelopmentGodot Debug Draw 3D Add-On – GameFromScratch.com

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


At this time we’re Debug Draw 3D, a will need to have extension for Godot builders. It’s carried out in C++ utilizing GDExtensions and is usable with C# and GDScript. It allows builders to shortly and simply draw traces, shapes and textual content on display screen, making debug (thus the identify) visualization a breeze. It’s carried out as a pair of singletons, DebugDraw2D and DebugDraw3D, in addition to quite a few configuration and supporting courses.

Debug Draw 3D is able to drawing the next:

Debug Draw 3D (4.2.2+)'s iconDebug 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; MIT; 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 Frustum
* Cylinder
* Gizmo
* Grid
* Line
* Line Path
* Line with Arrow
* Aircraft
* 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 study extra in regards to 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

- Advertisment -
Google search engine

Most Popular

Recent Comments