Curvy Lines in Godot 4.0
Today, we use the Curve2D node to create curvy lines in Godot 4.0, and Line2D displays and updates them in real-time. We also use Area2Ds to create draggable objects to move our curves around.
Code:
https://github.com/aimforbigfoot/NAD-LAB-Godot-Projects-4.0/tree/main/curveyLines
Link to my better draggable video:
• Pick and Drag in Godot 3.2 (it’s Godot 3.2, but the logic is way better imo)
Link to bezier tutorials:
• The Beauty of Bézier Curves @acegikmo lowkey inspired me with this video
Timeline:
0:00 - Intro
2:00 - WARNING ABOUT THE YAP
2:20 - Setting up the scene
3:16 - Making a draggable
8:18 - Setting up the Line Handler / Line Brain
11:00 - Drawing a linear line between points
13:17 - Understanding the curvy line
16:47 - Learning/setup curvy line
19:00 - Actually curving the lines
20:13 - Making better curves with handles
24:15 - Using two handles on a point for a curve
26:23 - End of line curvy
27:52 - Extra examples of curves
29:00 - Outro
The audio is finally in both ears o..o