I'm looking for techincal help in drawing a simple rectangle on the screen.
The original node is a CollisionShape2D which holds a RectangleShape2D,
I want to draw it in the same way it is drawn when the collision shape debug is activated, and I just can't manage to do it...
I should mention im using GDScript in Godot 4
Thanks in advance

  • You'll probably want to use a ColorRect node, as the name suggests it's a simple rectangle with a color.

You'll probably want to use a ColorRect node, as the name suggests it's a simple rectangle with a color.

    DexyBentai That already looks quite helpful, is there for it to inherit the position/rotation/etc of the original rectangle?

    Yes, if you make it a child node of whatever your object is, then it automatically inherits position and rotation. If you're using it in some kind of container (like a VBox or HBox) you can set the size to full rect, but if you just want to make a rectangle you'll have to manually set the size.