I created a new thread because is a different question but there are more info about in this question:
Right now I have a line which following mouse and is a child of an empty label, so to draw only inside label's rect.
The hierarchy is like this:
The code for the line draw is _proccess in Board.gd script and the Letters are inherited scenes of a base Letter scene.
for i in letternodes:
if i.get_child(2).text !="":
while $Line/Line2D.get_point_count() > trail_length:
With the above the line draws everywhere inside the label's rect, after I press and hold mouse left button and start dragging.
This is fine, but I' d like to have drawing in a specific path from letter to letter and also to clear the line points in reverse direction moving following that path.
If I uncomment the line:
and use this to draw the line this creates a polygon between letters centers(which is the correct path), but draws at once when I press mouse button.
So this is the correct path but I don't know how to draw this polygon gradually as dragging with the mouse left button pressed. And also to keep track of the path and clear the points as dragging in reverse direction.
To be more clear, when dragging from letter to letter I append the characters in a label every time the mouse enters a letter's area. So in reverse movement I want to remove the letter's character in order. Some kind of undo action.