Hello I have a little problem with big louad of verticles in my LineRender code.
Instead of smooth line, I’m getting a some kind of arrrows, like in the screen above:
Maybe some of you have had similar situation, and found any solution to solve that problem ?
Thx for any advice, and sorry for my poor english- Poland user ![]()
var url = "web with 5000 vertl";
var string:String;
var c1 : Color = Color.yellow;
var c2 : Color = Color.red;
var lengthOfLineRenderer : int = 5000;
var arr :String[];
var lineRenderer:LineRenderer;
function Start () {
var www : WWW = new WWW (url);
yield www;
Debug.Log(""+www.text);
lineRenderer.SetColors(c1, c2);
lineRenderer.SetWidth(1,1);
lineRenderer.SetVertexCount(lengthOfLineRenderer);
string=www.text;
arr = string.Split(","[0]);
Debug.Log(arr);
for(var i : int = 0; i < lengthOfLineRenderer*3; i=i+3) {
v1=float.Parse(arr[i+1]);
v2=float.Parse(arr[i+2]);
v3=float.Parse(arr[i+3]);
Debug.Log("1= "+v1+"; 2= "+v2+"; 3= "+v3);
var pos : Vector3 = Vector3(v1, v2, v3);
lineRenderer.SetPosition(i/3, pos);
}
}