- Home /
Question by
mjose · Nov 06, 2016 at 09:29 AM ·
unity 5scripting problemsprite
Drawing a 2D rectangle from point A to point B
Hello, I am having trouble figuring this out.
In my game, I have a graph-like structure with Nodes and Edges. What I need to do is to draw an edge as a colored rectangle that goes from the center of one Node to another. The game is being made with sprites only, but I have no problem if a better solution can be found using meshes
The Nodes and Edges are drawn at run-time from a Graph structure that keeps a list of nodes and a list of edges, so I must be able to do this programatically. A sprite will be moving along these edges, so they should not be UI elements (or at least that's what I believe. Please correct me if I'm wrong)
Thanks in advance
Comment