Astar Pathfinding

Updated on June 9, 2018 in [A] Brackeys Courses
Share on Facebook0Tweet about this on TwitterShare on Google+0Share on Reddit0
1 on June 9, 2018





I am creating a 2d endless runner game in Unity. I am using Astar pathfinding algorithm. In that I have created a grid graph that has a fixed width and height and scanned that area which is the area in which the enemy can move and kill the player. But I want to keep updating the center of this graph and rescan the graph through script so that when the player moves out of the earlier scanned area, the graph can rescan and create a new area for the enemies to move. Can I change it through Astar Path Script or is there any other way. I am stuck at this point. Any help is appreciated. 

Following tutorial 14 in the link provided.








Width: 100




Height: 100




Center : 0, 0, 0




I want to move the center everytime like 100 on the x axis and rescan it. Can I make changes anywhere in the Astar Path(script) CSharp.


  • Liked by