[Closed] Path MoveBlocked handling / re-pathing advice
I'm curious about how to best approach situations where the AI's path is blocked by dynamic props/obstacles, other AI/characters, etc.
I've experimented with having certain characters/objects affect the navmesh when they are stopped, but it causes constant rebuilds and really segments the navmesh.
If I left things as they are by default using the base detour crowd wrapper, the AI will eventually be pushed around into a unblocked poly, but this solution is not ideal.
Ideally I would think the blocked AI would repath around what is blocking them, but I don't know how to do that cleanly. I imagine you could find the poly that is blocked and exclude that with a custom query filter. I imagine that making dynamic navigation area's that affect an area cost is also not an ideal solution.
I could see the situation happening a ton in Paragon so was wondering how its being tackled.
The question has been closed May 26 '16 at 05:00 PM by AndrewHurley for the following reason:
The question is answered, right answer was accepted
Annotating navmesh when an obstacles stops is the ideal solution, in terms of the effects you get. It's not ideal if you have a lot of objects like that, because you'll end up with lots of navmesh rebuilds (although impact here can be controlled by navmesh tile size).
Paragon indeed suffers from this as well, and to be honest we haven't handled that just yet :) We're currently using CharacterMovementComponent's RVO implementation.
Regarding toggling "blocked" polygons on/off (or changing the area ID), it's a good idea, but the effect heavily depends on navmesh triangulation. It might be fine, depends on the specific game.
Alternatively you can offset the visual indication of this issue occurring by having pawn bump reactions, and having static pawns give way to moving ones.
In short: it's not a trivial issue :)
answered May 26 '16 at 05:00 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here