Is there a way to get all the possible locations a nav mesh agent can reach within a certain distance. For example, there is an archer. This archer wants to find a location where the closest enemy is at a distance of 150 meters or above away (not physical distance, but path distance). One way I could think of is by randomly selecting points around the archer and checking the path distance from the enemy, but that would probably be cost-heavy. Is there a simple solution to this problem?
This might be fine… try it and see.
If it isn’t fine and causes stutter (and you verify that is indeed where the stutter comes fmor), then perhaps have the “find me a new place to shoot from” function become a coroutine, have it choose random points and check only one path per frame, yielding in between it.