Hi there. Kind of new to defold, but I’m a programmer so learning quite fast. This is what I need, and I’m not what’s the best way to approach it:
1/ My input is three coordinates (relative to where I am, or absolute, it does not really matter).
2/ I want to draw a polygonal line of arbitrary width going through all the points. I want to be able to texture the whole line but if I could use something like the splice provided by gui elements that would be nice too.
3/ I want to be able to animate this line going from its origin to its end point.
A few solutions come to mind:
1/ Create GUI line segments for each section, and properly assemble them. I’m guessing I could in some way use clipping to animate them.
2/ Create GO line segments for each section, assemble them. In this case I’m not really sure how to handle the texture. But I can use a factory to spawn my segments. Animate with clipping also I guess, not sure how that would work for diagonal lines.
3/ Spawn a lot of very small sprites that constitute the line, that way I just animate the spawning. I just need to animate this creation once. Each small sprite is textured, and I can spawn different start and end bits by implementing the logic in the factory Game Object.
what would be the best approach?