I've updated my Editor Shapes plugin. Edit Vector2 properties the same way as a RectangleShape2D

EditorShapes is a small plugin for Godot 4.X that allows you to define shapes directly in the editor for drawing or logic purposes.

The main advantage of this plugin is that every node in Godot that allows you to define a shape and edit it by dragging its handles is either a physics-based node or a Control node that doesn’t inherit from the Node2D hierarchy. This plugin adds that same functionality, with a Node2D based node that doesn’t implement any physics behavior.

If you want to test the plugin, there is a sample project to help you understand how it works. Clone the whole repository (by using git clone, downloading it from GitHub won’t work) and you’ll have access to the sample project:

git clone https://github.com/Xesa/editor-shapes

Features

  • Add shapes by either:
    • Adding a RectangleZone2D node to your scene.
    • Declaring a RectangleEditorShape2D property in your script.
    • Declaring a Vector2 property named editor_shape_size in your script.
  • Customize your shapes by using EditorShapeConfiguration2D resources.
  • Add masks by using RectangleMaskingZone2D nodes.

Links

Screenshots

Works like a built-in editable shape

Works like a built-in editable shape

Snap to grid, customizable for each node

Snap to grid, customizable for each node

Customize editor colors and make the shape visible at runtime

Customize editor colors and make the shape visible at runtime

Create masks

Create masks