Does anyone know how I can make a custom gizmo become visible in debug mode?
The gizmo is a EditorNode3DGizmo made of line segments. I would like it to be visible when I run it in debug similar to collision shapes/raycasts with 'Visible Collision Shapes' enabled.


My custom gizmo


Godot gizmos with 'Visible Collision Shape'

  • GreatOdds replied to this.
  • GreatOdds
    Did some digging through the source. It seems the collisions shapes seen in debug mode are not the same as the editor gizmos. Instead, the collision object gets the debug mesh of the collision shape and adds it to the scene if 'Visible Collision Shapes' is set and the game is not running in the editor.

    Seems like I'll have to include the debugging mesh/code with my game object.

    GreatOdds
    I know I could just add a mesh instance and draw a new gizmo but I would like to keep my gizmos separate from my game objects.

    GreatOdds
    Did some digging through the source. It seems the collisions shapes seen in debug mode are not the same as the editor gizmos. Instead, the collision object gets the debug mesh of the collision shape and adds it to the scene if 'Visible Collision Shapes' is set and the game is not running in the editor.

    Seems like I'll have to include the debugging mesh/code with my game object.