Hello! I’m making a blueprint based game. I made a very simple AI oponent using NavMesh for chasing the player, when he sees him. I’m encountering a big problem, because I’ve implementen so called “safe zones” which are areas where the player can run to, and the AI can’t go inside there.
The problem is that if the AI can’t reach the player through navmesh, it ignores everything and enters the area. It only considers the nav obstacle/null/highcost area if there is an alternate path available. If there isn’t it walks EVERYWHERE. I’ve tried to use all possible nodes for move to, both to location and to actor, nothing helps, no settings on the NavModifier help as well.
I would simply want the AI to walk closest as possible (meaning the safe area entrance) but STOP at that point, wait few seconds and go away, but can’t find a way to do it. Similar to a RTS game, if You send units to a location unreachable (like let’s say an island, or blocked area), they go to the edge and wait there looking toward the desired location, but can’t walk any further.
well, the navmesh modifier set to null makes this area empty like it has NO navmesh, and I tried and the AI also walks out of the navmesh volume. When it can’t find a path it just ignores everything, and also at my case and the level design I would have to have tons of separate nav volumes to achieve this.
I’ve found a walk-around, by creating a new blueprint class called safe zone. I simply check if the overlaping object is a zombie, cast to it and force it to stop movement, and for now it seems to work, but I still would rather have controll over the navmesh.
The move to nodes have a property called “use partial path” which should force them to go as far as possible and stop if the target can’t be reached, and it doesn’t work, The navmesh modifiers are made for a reason, and they should work, so the AI won’t walk aroud places I don’t want them to, but it does.
yeah, I agree. to be frank I’m fairly new to navmeshes as well. another solution could be to change the safe zone box collision to only collide with enemies. but again, not a navmesh solution. sorry