void Start() { generateReedsShepp = new GenerateReedsShepp(turningRadius); //Pool line renderers PoolLineRenderers(lineForward, pooledLinesForward); PoolLineRenderers(lineReverse, pooledLinesReverse); }
private void Update() { //Deactivate all line renderers for (int i = 0; i < lineArray.Length; i++) { lineArray[i].positionCount = 0; } if (generateReedsShepp == null) { float turningRadius = SimController.current.GetActiveCarData().GetTurningRadius(); generateReedsShepp = new GenerateReedsShepp(turningRadius); } Transform startCarTrans = SimController.current.selfDrivingCar; DisplayShortestPath(startCarTrans, goalCarTrans); }