EZ Curved Lines 2D

by renevanderark

1

EZ Curved Lines 2D for Godot 4.4

This plugin helps you draw smooth curved 2D lines, polygons and collision polygons quickly in the 2D editor.

Using godot's AnimationPlayer you can even create key frames for the curves lines to animate them.

Quick Start

After activating this plugin via Project > Plugins follow these steps.

1. Create a new 2D Scene

Create a new scene

2. Add a DrawablePath2D node to you scene tree (Ctrl + A)

Add a DrawablePath2D

3. In the Inspector tab click the Generate New Line2D button

Generate a new Line2D

4. Start drawing your DrawablePath2D like a normal Path2D

Adding and manipulating points the normal way you would for a Path2D.

Path2D tool buttons

Creating curves using the Select Control Points mode:

Select Control Points button.

5. You can change the properties of the Line2D in the inspector

Your new line will update every time you change the Curve2D of your Path2D

Editing the DrawablePath2D

Animating

You can use the Update Curve at Runtime checkbox to enable dynamic changing of your curved shapes at runtime.

update curve at runtime

Add keyframes in an animation player

You can then add an AnimationPlayer node to your scene, create a new animation and create keyframes for your Curve > Points (in the inspector):

animating

Performance impact

This does, however impact performance of your game somewhat, because calculating curves is an expensive operation.
It should be used sparingly.

Under Tesselation settings you can lower Max Stages or bump up Tolerance Degrees to
reduce curve smoothness and increase performace.

Polygon2D and CollisionPolygon2D - new in version 1.2.0

Version 1.2 adds the exciting new ability to create curved Polygon2D and CollisionPolygon2D!

An updated quick start and youtube explainer will follow as soon as I have some more time available

New features: Polygon2D and CollisionPolygon2D

They can be assigned to the DrawablePath2D node the same way as a Line2D (explained in the quickstart).

Note on assigning CollisinPolygon2D

Note, however, that a CollisionPolygon2D will at first be generated as a direct child of the DrawablePath2D using
the Generate CollisionPolygon2D button, but it does not need to be a child to remain succesfully assigned.

This way you can move it up the hierarchy of your scene to become a direct descendant of a CollisionObject2D (like Area2D, StaticBody2D or CharacterBody2D)

Examples

A simple animated polygon

simple animated polygon

Rat's tail

a rat's tail

Rotating butterfly net

butterfly net

The start of a leopard face

leopard

Explainer on Youtube

Explainer on youtube

Leopard face timelapse on Youtube

Leopard face timelapse

Attributions

This plugin was fully inspired by Mark Hedberg's blog on rendering curves in Godot.

The suggestion to support both Polygon2D and CollisionPolygon2D was done by GeminiSquishGames

Version

1.1.0

Engine

4.4

Category

2D Tools

Download

Version1.1.0
Download Now

Support

If you need help or have questions about this plugin, please contact the author.

Contact Author