- Home /
How to implement A* to have an AI trying to reach the player
Hello, I need to implement A* so that enemies try to reach the current player's position, by avoiding obstacles. So that every few frames, the enemy calculate the best way to reach its destination and try to do it.
My question is, what is the best and most simple technique to do it? Is placing a nodes grid on the level any good? I read about rays to detect obstacles but thats all I know.
Thanks in advance!
Answer by Rod-Green · Apr 26, 2011 at 12:02 AM
I've created a barebones textbook implementation of the A* method and added it to the wiki. http://www.unifycommunity.com/wiki/index.php?title=AStarHelper
Answer by spinaljack · Sep 26, 2010 at 07:34 PM
Download Path from angry ant http://angryant.com/
There are some things that need fixing before it'll work with Unity 2.6
Mr. Joy's version has a handy DLL which I've used previously to great effect:
http://github.com/MrJoy/Path-GPL
Version 1.1 will come out with Unity 3 support after Unity 3 is out.
Another A* program:
Your answer
Follow this Question
Related Questions
A* pathfinding - how to put penalty below a character 0 Answers
How to calculate distance based on A*? 2 Answers
Move RigidBody with translate 1 Answer
Splitting scene into nodes for A* 0 Answers
Pathfinding with Roads 2 Answers