Exactly. Pathfinding and steering are two different tools for different purposes. Pathfinding in like GPS – it can only give you information about when to turn, but it knows nothing about where all the other cars are, so it can’t drive for you. That’s what your eyes on the road are for in a car, and that’s what steering does in AI. It goes in the overall direction of the next path waypoint, while at the same time avoiding, so called, local collisions with other stuff.
So bottom to top it’s like this:
- Pathfinding – the general set of waypoints to pass through, or (better) a corridor of polygons to stay within.
- Steering – avoiding local collisions with dynamic object and vehicles and turning smoothly on the road to the next waypoint
- Physics and collision detection – making sure the character doesn’t walk through stuff when all of the above fails to prevent a collision.
The thing I still need to work on is keeping the character inside the path corridor and inside the navigation mesh at all times during steering. This is rather complex, for my current standpoint, so it might take a while. Especially that I’ve currently decided to dive into some other parts of my todo, that’ve been desperately crying for my attention for months now.
Oh, to make one thing clear. With a dynamic navigation mesh, you can make your pathfinding know about dynamic obstacles. Detour does that. However, this is rather complex and even if my skills and time allowed me to extend Stainless’ pathfinding by this, I’m not sure python would handle that anyway. Panda AI also has dynamic obstacle avoidance built into pathfinding, but it uses a 2D navigation graph, with which it’s a lot easier to achieve (because it doesn’t require cutting polygons), but at the same time this type of navigation data is very limited.
Additionally, even with that, you still need steering for interaction between AI vehicles, because no pathfinding can do that.