-
-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a cyclic
property to Curve2D
and Curve3D
to make them closed automatically
#6396
Comments
cyclic
property to Curve2D
and Curve3D
cyclic
property to Curve2D
and Curve3D
to make them closed automatically
I think
I think the dedicated button in the top bar could be removed if a |
I took
Idea was to turn it into a shortcut in case people would find doing it through inspector too cumbersome, but i imagine removing it wouldn't have much impact in the long run anyway. |
I opened a new proposal you'd want to check @ettiSurreal |
Recently I've been using looping curves a lot, and it's not a pleasant experience because of lack of proper support, I would prefer a cyclic/closed property though. |
Here we go, I implemented the 2023-12-14-21-42-38.mp4The lag is a video recording issue.
When would be the right time to open a pull request? Should I complete all of the talked about features before opening one? |
You can open a draft pull request now, or complete the features you listed before opening your PR. Opening a draft PR can be useful if you're looking for help to complete the feature.
I'd leave it to a separate PR so we can iron out any issues in the Curve3D PR first, and then replicate the design for Curve2D. |
Okay, I'll open a draft when I'm ready. |
Sounds good. I'd probably go with green for the first point, red for the last point, yellow for the first point if it's a closed curve.
This is a good idea! We currently don't have a system in place to draw text near 3D gizmos yet, so this would require a bespoke solution. Note that we can't create additional nodes to draw gizmos, so Label3D can't be used here. |
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 toCurve2D
andCurve3D
, 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
andCurve3D
point array would now have both In and Out positions. Maybe hide the unused handle whencyclic
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 toToggle 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.
The text was updated successfully, but these errors were encountered: