Welcome to the forums @EAK
You can use the _draw
function in any node that extends CanvasItem to draw in 2D. For example, you could use something like this to draw a 200px line using the draw_line
(documentation) function:
func _draw():
draw_line(Vector2.ZERO, Vector2(0, 100), Color.red)
The documentation has a page on custom drawing in 2D that might help.
The gradients might be harder though, as I do not think there is a easy way to do this in Godot with built-in functions. You may need to write a custom shader to give the lines gradients.
Also:
This discussion was caught in the moderation queue since you have not confirmed your account yet.
Upon creating your account you should have received an account verification email. The confirmation email may have been incorrectly flagged as spam, so please also check your spam filter. Without confirming your account, future posts may also be caught in the moderation queue. You can resend a confirmation email when you log into your account if you cannot find the first verification email.
If you need any help, please let us know! Thanks! :smile: