How to connect AI navigation and AI sight cone?

Task is related to stealth AI behavior. I use default move to.

There is NavArea to afflict the path but how to filter path with cones of sight. It’s become problem because you can’t cut navareas with obstacles and there is no trace navigation filters.

Any ideas comrades?

Sure you can. So what?)

So you suggest to cast a bunch of traces to get hit locations and normals to create cutting planes. Don’t forget to join parts back if they still visible. All that for every moving AI character in area at least every second.

Don’t you think this solution has HUGE cost for perception purpose?

Even custom EQS would work but it’s still the dumb walkaround. I don’t believe that such huge systems like navigation and perception don’t have simple connection.

I’m talking about cutting the mesh mostly at this point.

If you know how to bind NavArea to procedural mesh this task as easy as a spit.

You can set the NavMesh to be dynamic in the project settings

when you got that enabled you have many ways to cut the navarea as you need, especially with obstacles like meshes

the other way is to setup precise pathfinding in c++

well obviously every project is different, if your projects contains massive amount of AI logic running at the same time the answer is yes, performance is gonna be an issue. That’s why games with a lot of complex AI characters are usually made with c++. That’s basically a huge game design decision and only you can take it. Btw traces are very cheap, i suggest you to atleast give it a try. You should not see huge changes in performance if we are not talking about hundreds of characters running towards each other with complex AI and pathfinding. Also is common in most modern games to despawn AI when is far from player, even a couple rooms away. Another example is Darks Souls 3: mobs at a certain distance that are not in the camera view are being despawned or simply their logic is being paused.