Complex Shape Creation's icon

Complex Shape Creation 2.1.1 2D Tools 4.2 Community

Submitted by user 9thAzure; MIT; 2024-06-24

An addon for the Godot Engine which adds several functions for creating and modifying shapes, and a few nodes that uses those functions for creating visuals or for creating collision shapes.

These functions and nodes are written in GDScript to make them universally compatible. They are exposed to C# via wrapper classes in the `ComplexShapeCreation` namespace.


--- Nodes ---

Currently, there are 4 nodes:
- RegularPolygon2D < 'Polygon2D' - General purpose node for drawing shapes.
- SimplePolygon2D < 'Node2D' - counterpart to RegularPolygon2D that only draws simpler shapes.
- StarPolygon2D < 'Polygon2D' - Version of RegularPolygon2D for drawing stars.
- RegularCollisionPolygon2D < 'CollisionShape2D' - Node for creating both regular and star collision shapes.


--- Functions ---

Currently, functions used for creating shapes are split across the multiple nodes added. Most of them are in RegularPolygon2D.

Some exceptions are:
- a simplified version of 'get_shape_vertices' is in SimplePolygon2D.
- 'widen_polyline' and 'widen_multiline' are in RegularCollisionPolygon2D.
- 'get_star_vertices' is in StarPolygon2D.

The 'get_*' functions create shapes and returns a new 'PackedVector2Array'. All other functions modify the array passed in as the argument.


View files Download Submit an issue Recent Edits