Original Post
Hi, I need some input on a navigation issue. Based on a waypoint system I'm able to calculate navigation paths considering different environmental conditions. But there's one special case in which it is too slow and clumpsy. If a NPC wants to follow or hunt an other NPC I need a more dynamic path finding approach. Here are some restrictions and requirements: - Path should be limited to 5-10 nodes. - Path should not be rebuild. Once it has been setup, only changes apply to it. - As input I have the hunter and the victim. - No environmental conditions need to be considered. Well, my idea is to start with an A-star to setup an intial path. For each iteration after the inital setup do the following: 1. Determine the closest waypoint X for the hunter. 2. Determine the closest waypoint Y for the victim. 3. Check if X is included in the path. 3.1 If X is included, dispose all nodes before X . 3.2 If X is not included, check if you can reach one of the path nodes within N (=2) steps. Then try to merge the paths. 4. Check if Y is included in the path. 4.1 If Y is included, dispose all nodes after Y . 4.2 If Y is not included, check if you can reach one of the path nodes within N(=2) steps. Then try to merge the paths. 5. Remove cycles. Abort if the path gets too long or if 3.2 or 4.2 failed. Is it feasable or do I reinvent the wheel ?