Skip to content

Implementation of A* pathfinding algorithm in Unity 3D. This unity project will find the optimal path, given a randomly "elevated" map and a target point.

License

Notifications You must be signed in to change notification settings

ChrisdeWolf/unity_astar_pathfinding

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

unity_astar_pathfinding

Implementation of the A* search algorithm in Unity 3D to generate an optimal path, very useful in AI pathfinding for video games. This unity project will find the optimal path, given a randomly "elevated" map and a target point. The calculated optimal path can be seen in the below images, represented by white spheres.

O(b^d) run-time and space complexity -- often best choice pathfinding algorithm for video game pathfinding which often require dynamic graph traversing.

This implementation uses a custom grid object defined by the GridObj class found in GridObj.cs, and the A* algorithm is then implemented using the GridObj class in pathfinding.cs.

Randomly Elevated Map

Alt text

Generated Optimal Path

Alt text Alt text

About

Implementation of A* pathfinding algorithm in Unity 3D. This unity project will find the optimal path, given a randomly "elevated" map and a target point.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages