コード例 #1
0
        void Start()
        {
            generateReedsShepp = new GenerateReedsShepp(turningRadius);

            //Pool line renderers
            PoolLineRenderers(lineForward, pooledLinesForward);
            PoolLineRenderers(lineReverse, pooledLinesReverse);
        }
コード例 #2
0
        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);
        }