0

I have made a line using the Unity line drawing asset Vectrosity. Please see the code below.

var linePoints = new List<Vector2>(){new Vector2(20, 30), new Vector2(200, 300)}; // C#
    VectorLine myLine = new VectorLine("Line", linePoints, 2.0f);
    myLine.Draw();

How can I draw/animate this line over some duration?

IronThrone
  • 242
  • 1
  • 10
  • Isn't that what you are doing with `VectorLine("Line", linePoints, 2.0f)`? – Programmer Jan 23 '18 at 20:27
  • @Programmer No `2.0f` represents the thickness of the line – IronThrone Jan 24 '18 at 03:39
  • Ok. I have two questions for you: 1.Why are you not using Unity's LineRenderer? 2.When say specific duration, you mean draw line at `20,30` then move the line to `200,300` over time? – Programmer Jan 24 '18 at 06:32
  • @Programmer 1. I am working on something that in the end will require a lot of complex line drawings and animations. The line renderer can be quite annoying to work with (in my opinion, doing some stuff with it isn't straight forward especially complex stuff). Vectrosity handles everything line renderer related and provides more intuitive functionality. 2. I want to draw the line from `20, 30` and extended it over some time (seconds) till it reaches `200, 300` – IronThrone Jan 24 '18 at 11:11
  • For extending line over time, the duplicate should get you started for LineRender. Simply modify it to work with your plugin. – Programmer Jan 24 '18 at 11:14

0 Answers0