I want to generate a bunch of animated lines trailing behind objects, which I’m planning to do using the LineRenderer. This is what I have so far:
for(var i : int = 0; i < lengthOfLineRenderer; i++) {
var pos : Vector3;
pos = Vector3(i * 0.2, Mathf.Cos(i*0.1+Time.time), 0);
}
This generates the curve and animates it, but not in the way I need it to. The starting point needs to be static and the trailing points need to be animated according to a curve.
I’ve been stuck on this for a few hours, and cannot seem to find the solution to this.
Has anyone done this one before and/or knows the answer to this?