Theres a couple of really good articles on path finding in the first Game Programming Gems book, well worth getting.

Basically, what you do with A* is find the least expensive route from one node to another node. “Expensive” can mean just about anything, and “node” can also be just about anything. In the most common case of pathfinding, a node is usually a cell in a 2d grid, and the cost is distance. You provide A* with the node, and a way to get to each nodes neighbours, as well as two methods for cost calculation: the first calculates the cost for moving to a specific node from the start node (this we can usually calculate accurately, with a 2d grid for nodes it’s very straightforward) and the second one calculates the cost for moving to the end node from a specific node (this is usually an estimate, as we probably don’t know for sure until we’ve found the path).

To extend this to a 3D world, all we need to do is use a suitable type for our nodes, along with functions to get a nodes neighbours and calculate and estimate the costs.

What type of nodes we use can have a huge impact on performance. The most efficient type of nodes is probably if you manually create a pathfinding network for each level, by placing and connecting nodes. A quite inefficient way would be to use a 3d grid (like a cube build up of many little cubes, each a node for the pathfinding, with some marked as not walkable), but this could be automatically generated. Other techniques involve using the existing polygons of, say, the floors, as pathfinding nodes, but this makes the cost estimate/calculate methods slightly more complicated.

There’s lots of different ways to do 3d pathfinding with A*, but what they all have in common is that they all have the nodes, with neighbours, and cost calculate/estimate functions.

An interesting thing to note, is that A* can be used for all sorts of problem solving besides path finding, where you can break down the problem into nodes and write good enough cost calculate/estimate functions.

I am using Irrlicht 3d engine and going to add AI to my project.

I still don’t know how to do with that, i am finding relative materials.

If anyone know about this, please give me some advices! Thanks a lot!