+2 votes


Can someone help me on how to create a dashed or dotted line in Godot?
Seems stupid, but can't find how. There is an easy way or need to create a lot of dots over a path ?

This is my actual line code:

draw_line(initialPos, finalPos, color, 2)

Thank you!

asked Mar 29, 2016 in Engine by rwrz (38 points)

1 Answer

+1 vote

If I'm not wrong there is no direct method to do it. But you can create a function that draw multiple smaller lines, given initialPos, finalPos, length and distance between lines.

answered Mar 29, 2016 by al.glez (98 points)

you could use a dashed line texture

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.