Replies: 1 comment
-
Made a proposal here instead: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, Line2D doesn't render the correct curved geometry that would intuitively expectat from how define you width curve - it doesn't accommodate well for when the number of points on your line are less than the number of points on your curve.
Here's an example of the problem described:

And this is what I expect it to look like:

I have a pull request here that fixes it by generating additional points on a line based on the number of segments derived from the curve bake resolution: godotengine/godot#95541
Along with the problem described above, my pull request also adds an extra
curve_offset
property which allows you to do some neat Line2D animations with the curve width (see example videos below).Segment produce better 'wavey' lines when more curve control points exist than line points:
https://github.com/user-attachments/assets/35a1fe1a-bd1f-4313-bb29-d7d7adb75b57
Curve offset adjusts the sampling position of the curve:
https://github.com/user-attachments/assets/d66792df-39c9-4945-93ab-47e96d49cfcd
You can also animate the curve offset to produce some neat line effects:
https://github.com/user-attachments/assets/e1e2d108-ad7d-4fdd-83b9-3629abf76da2
Other Notes:
Beta Was this translation helpful? Give feedback.
All reactions