Original Post
Hi, I use a navmesh to do the pathfinding in my 3D game. For the 2D creatures this works wonderful. However the paths for the flying creatures are far from optimal. The reason for this is that the A* does not hold into account the height of the flying creature or the height of the destination, everything gets projected on the ground (navmesh). Is there a way to make the paths closer to optimal. For instance flying over a house instead of around it. I have tried forcing the pathfinder to take 2D-distance measurements (and ignoring height) instead of 3D-distance. This way it favors straight paths over houses etc. The downside is that it now always flies over objects instead of around. When we have a thin but high object like a tree or a tower going around is shorter, but that path is ignored. I know it shouble be possible by tweaking the cost and heuristic functions of the A* but I can't figure out how. Any help would be greatly appreciated, Greever