DmitriySalnikov / godot_debug_draw_3d

Draw 3D debug graphics and 2D overlays with this add-on.
https://dd3d.dmitriysalnikov.ru/
Other
435 stars 22 forks source link

[Feature Request]: Add support for 3D Debug Text #53

Open Stefotono opened 2 weeks ago

Stefotono commented 2 weeks ago

Feature description

I find myself in a lot of scenarios where text over an object or spot would be helpful for a debug view. for example I was creating a verlet integration system and rendering it with DebugDraw3D but kept forgetting the indexes for points and so I needed to instantiate Label3Ds and position them.

But I think having the ability with just one line to do that would be nice enchantment Just having a few new functions available along the lines of:

DebugDraw3D.draw_text_xf(transform, message, colour) this one would be a plane which takes the transform

DebugDraw3D.draw_text(position, message, colour) this one would be a billboard which face the camer located at the specified position

and for fancy people you could add like is_centredor bbcode enabled

that's all I`ve got to say. Have a nice day.

Implementation Ideas

Under the hood it could just be instantiating Label3Ds and moving them about. To optimize it a bit they could be pooled.

DmitriySalnikov commented 2 weeks ago

Yep, 3D labels were in my plans.

Under the hood it could just be instantiating Label3Ds and moving them about.

Yes, that would be the easiest solution. And as far as I remember, it is impossible to draw text without nodes (a 2d text mesh is generated in the node itself).