Ejemplo n.º 1
0
        //Generate a path with Hybrid A*
        public void GenerateHybridAStarPath(Transform targetTrans, List <Node> finalPath, List <Node> allExpandedNodes)
        {
            CarData targetCarData = targetTrans.GetComponent <CarData>();

            //Get the data belonging to the current active car
            this.carData = SimController.current.GetActiveCarData();
            //Each car may have a different turning radius
            reedsSheppPathGenerator = new GenerateReedsShepp(carData.GetTurningRadius());

            //Everything we need to reset before we begin
            Reset();

            //Run the main loop
            RunHybridAStar(targetCarData, allExpandedNodes);

            //Generate the final path when Hybrid A* has found the goal
            GenerateFinalPath(finalPath);
        }