Jump to content
  • Advertisement
Sign in to follow this  
lukesmith123

Combining A* Pathfinding with Steering Behaviours

This topic is 2563 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm trying to get my head around how steering behaviours can be combined with A* pathfinding.

My first thought was that if I have an enemy A.I that is patroling an area the A.I can use pathfinding for his normal movement and switch to steering behaviours with wall avoidance when he comes into contact with the player.

But then that it occurs to me that this would make the A* routine redundant as we may aswell lose the A* pathfinding and have the A.I keep track of the waypoints he needs to traverse in the route that he is patrolling.

Could anybody explain this to me?

thanks,

Share this post


Link to post
Share on other sites
Advertisement
Typically you use a pathfinding routine for high-level routes (room A to hallway B to stairwell C) and perform local steering or other control to navigate those routes. Navmeshes are a very common and effective solution for this.

Share this post


Link to post
Share on other sites
So for instance the the A.I object would use the seek behaviour to move to each waypoint in the path?

I want to work with waypoint graphs rather than nav meshes.

The part thats confusing me with waypoint graphs is if you dont want the A.I object to follow the path exactly but to stick near the path.

Share this post


Link to post
Share on other sites
The purpose of using waypoint graphs is, in the typical case, to eliminate local navigation for agents. You precompute the legitimate paths and your agents stick to them more or less exactly. You can, with great contortions, use a waypoint graph as a hint and supplement it with local steering, but it's far more pain than it's worth in most cases.

To do what you describe, you really should be using navmeshes.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!