Find Closest Navmesh edge point that meets certain requirements
I creating a dynamic cover system for my navmeshagents. Currently they check for points within shooting range of the player. They do this by checking for the closest navmesh edge to 4 predetermined points close to the player. It then determines whether any of them points can be used as cover points (they can look over it, player cant see them when in it and so on).
The problem that I've come to realize is that there may be cover points they can use but they aren't the closest edges to the 4 points they check from, meaning they will decide there isn't cover even if there is.
What I would like to do is to check for any positions within an area that meet all requirements (the closest point to the AI that is a navmesh edge that they can attack back at the player from and the player doesn't have direct sight of the AI).
Is this possible? Or am I thinking about this in the wrong way? If anyone can point me in the right direction it would be much appreciated.
Your answer
Follow this Question
Related Questions
using Navmesh or ML Agent ?! 0 Answers
Can you move a NavMesh with a GameObject? 1 Answer
NavMeshSurfaces with Link 0 Answers
Finding Boundaries of a Cover Object 1 Answer
Is there anyway to avoid a StackOverflow 0 Answers