Testing A* Algorithm in Unity

Last weekend I was trying to implement A* algorithm in unity .why Unity ? It’s one of the most popular game engines i have seen so far ? Why A* It’s one the most famous path finding algorithms in Games. Did it worked ? yes it did . How  ? look below .

Where is the code  ? I have pushed all the codes in this projects to Github .Here are few tips on how this works, first of all this code divides a certain amount of area into a grid based on the size of a game object . I used a blue box that represents a cell in the grid hence, the whole blue area is my grid .Then I find the path from starting point of the  grid  to the position where you clicked .I would love your contribution in optimization of this code .

Here is the link to the Repository .

Thanks for your time ..

Share

AboutHarprasad

I do what I love. There is a famous quote "Love the process not the product " & I think this is what differentiates developers from consumers .