Adding custom gizmos in editor mode?

Godot Version

4.2

Question

Hello!

I have a simple procedural creature set up as in this video https://www.youtube.com/watch?v=qlfh_rv6khY.

The logic works, but it is a hassle to set up the various body segments with magic numbers.

What I would like to do is have a way, in the editor, of spawning Gizmos that would behave like a CircleShape2D - with a handle for position, and one for radius, for each body segment.

Other things I’d like are:

  • have a button to add/remove a body segment
  • emit the proper signals when one of the properties is changed so that I can respond to it
  • force certain position constraints (for example, X position of one segment would always be between the previous and the next one, which I can do with clamping whenever a position changes)

I’ve tried using a [Tool] on a controller node, but even if I created CollisionObject2Ds, I see their debug collider, but not in the scene hierarchy and I cannot control them, only see them.

I am using C#.

Please tell me if something is unclear or incomplete.

Thanks! :slight_smile: