Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
destroyin metod
#1
hi i have try create to create in run time spline for make infinite runner void Start () {  onpos = startpos;
  //InvokeRepeating (Spl(),1,1);
  InvokeRepeating ( "Spl",1,1); } void Spl (){  curve.Delete ( curve.ControlPoints[0], false);
  curve.Add ();
  //curve.ControlPoints[curve.ControlPointCount-1]  float x = 0;
  float y = onpos;
  float z = 0;//0;Random.Range (-5,5);
  onpos +=1;  Vector3 vv = new Vector3 (x,y,z);
  
  curve.ControlPoints [curve.ControlPointCount-1].Position =(vv);
  curve.Refresh (); }

it's slow but the real trouble it's sometime i got curve is refresh with all controlpoint
for exemple here i got 4 point and after time i got 10 or 20 and crash for vertice number 65000k
Reply


Forum Jump: