Skip to content
This repository was archived by the owner on Oct 8, 2023. It is now read-only.

portoaj/AStarUnity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

AStarUnity

Generates a series of water and grass tiles and dynamically finds the shortest path from the player to the target using the A* algorithm. Demo video included.

Usage:

  1. Download and open the AStar folder in Unity. The current Unity Project version is 2019.3.0a4
  2. Open the demoscene and click the play button
  3. A series of tiles should spawn
  4. Enable gizmos and click on the PlayerDemo GameObject in the hierarchy to show the trail
  5. You can move the player using the arrow keys or a controller and the trail will update dynamically

Note: A* allows for node weighting, and in this case the water nodes have a weight of two and the grass nodes have a weight of one. This means the path will usually steer towards grass, only crossing water tiles as necessary.

Sources:

About

AStar implementation in Unity for pathfinding

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages