Skip to content

Add a cyclic property to Curve2D (already implemented in Curve3D) #6396

Open
@ettiSurreal

Description

@ettiSurreal

Curve3D done as of godotengine/godot#86195.

Describe the project you are working on

Testing!

Describe the problem or limitation you are having in your project

The current way the engine handles closed/cyclic curves makes them very hard to work with
This implementation also seems pretty hack-y, and is not how most other software do it.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Add a cyclic property to Curve2D and Curve3D, that toggles if the curve is closed/cyclic. This is how most game engines and software handle it.

Could also be named closed

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Unlike now, the first and last points in the Curve2D and Curve3D point array would now have both In and Out positions. Maybe hide the unused handle when cyclic is off?

Setting cyclic to on makes the first and last point connected, now without making a new point to connect them.
Attempting to add a point at the end of the curve in the path editor sets the spline to cyclic instead of adding a new point.
Close Curve (rename to Toggle Cyclic?) in the path editor would now simply toggle the property.

If this enhancement will not be used often, can it be worked around with a few lines of script?

You could probably make a script that clamps the last point to the first, to make it easier to edit, but this proposal is about changing the node behavior to make it work like this out of the box.

Is there a reason why this should be core and not an add-on in the asset library?

Improving the editor usability out of the box.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions