Let’s say that flanking in this case is defined by taking a path, which is a path from the current AI Pawn location to the player Pawn location and stays away from the shortest distance path.
Is there a reasonable way to do this with:
EQS?
Spawn NavModifierVolumes along the shortest path and surrounding the shortest path to have a gradual fall off of cost?
Or should I be writing my own RecastNavMesh and QueryFilter and then writing my own costing function which is essentially (DistanceToShortestPath + DistanceToTarget)?
Are there any other terrain analysis tools for Unreal Engine to help the AI reason about the tactical environment? Influence Maps? Heat Maps? etc?
There is actually a pretty elegant mathematical way to accomplish this (best implemented using EQS in my opinion).
Using EQS you will query a path destination that is X units away from your target, and X2 units away from your character. The result of this operation (which can be tuned for your specific needs) is that your AI will always be approaching your Player, but will always flank to the left or right as they need to satisfy the X2 requirement of the EQS Query.
For an added layer of hotness, dig into the Dot Product filter of EQS, which will allow you to avoid locations directly in front of your character.
I have been struggling to understand how the Dot functions work in EQS, also the scoring system. Would you be able to elaborate on what you were using for a configuration or setup to get consistent results? I’ve tried a few things, but it doesnt seem to match my understanding of dot product here: Dot Product
Any time I try to deviate from defaults the numbers just appear jumbled, so maybe im not understanding how to incorporate DOT functions into Unreal Engine?
Here is an example of what I tried using (Note: doing rotation as forward vector from the player as an actor, and the other is just stored location (Should be same??) of the players location as last seen by the AI):