A* Pathfinding in 3D Environment

Started by
10 comments, last by Zukarakox 16 years, 1 month ago
Hiya Zukarabox, judging from your A* algorithm, it is evident that you are trying to modify it to suit your own needs. In order for me to answer the question in more detail, I need to be exactly clear on what you are trying to achieve. When I studied A* algorithms in Maths at University, I found the centre point for each node, then moved between each node until I found the final destination node. However, am I right that you want to enhance this by working out the best angle to travel between these nodes, which are also determined by the pathway the character is travelling from? From what I have read, you have created an Algorithm to work out the best angles, but unfortunately for the whole Path rather than for the next node the character needs to do. If I am right, then you are trying to be more efficient with your code, so the angle does not have to be worked out between each path, when the next frame occurs, and the path is reworked.

To summarise what I have just said, could you please tell me in a bit more detail what exactly you are looking to achieve, Thank you.

Dalyk
Advertisement
Sorry, in retrospect my first post was alittle vague. I do not know any proper terminology, I'm 100% self-taught, so try to bear with me. :P

Structure of NavMesh:
Polygons (A flat, convex figure, containing Edges)
Edges (Connections of Polygons)

So for a very basic pathfinding, I just used A*, using Edges' center's as mediums for nodes (using a Manhattan heuristic).
After the edge-to-edge path was calculated, I applied an algorithm to find the proper points to cross the edges at, keeping in mind where the unit was coming from and where it was going to. (IE: If his destination is far right of an edge, he would hug the right point, given that the destination was not around a strange curve or some such.)

The problem with this is, in short, that the first edge-to-edge A* technique would sometimes return wrong edges for the optimal path because the center of an edge is almost never used, and can cause the acutal distance travled to vary greatly.

So, I'm looking for a suitible technique to avoid this issue, while still maintaining a good deal of flexibility and a half-decent speed (I tried spamming every POSSIBLE path from poly A to poly B and after I ended up with more than 50 or so polygons, the program would freeze up for a few seconds when calculating the path.)


Edit: Still reading through the Framed Quadtree papers, I havn't had much time to work on AI lately :P

This topic is closed to new replies.

Advertisement