NavMesh modifier and Navmesh paths

Hello,
I have encountered a problem with the " NavMesh modifier" component which is It doesn’t work.
I’ve created an Actor that I’ve made the " NavMesh modifier" component a child to It then I added this actor as a child actor to my character hereafter I set the " Area class " to " Obstacle" with a large “failsafe extent” so that AIs won’t choose the path nearby the player to reach where they are supposed to be, but It seems the " NavMesh modifier" doesn’t update and AIs still choose the shortest path whether they collide the Player or not, I want them to choose a path that player can’t see them reaching their destination.
what options are there to resolve this?

Forcing the Navmesh to rebuild every tick is expensive on performance and is turned off by default if I recall correctly. Which explains why your use of the Modifier won’t work.

I can’t find any recent tutorials on how to force Navmesh rebuilding, so your best option would be to work out a custom path for your enemies to take.

apologies for my late response and thank you for your guidance.

This does help a bit buy as you mentioned It is expensive and since I want the AI to find the path dynamically I may not want to use

unless I find no other way around this

What I think you’re trying to do is fairly advanced so finding an exact answer is tough.

To make sure I understand the problem, can you try to elaborate using a diagram or a video?

Hi, apologies for the late response I have to deal with my university classes at the same time I’m working on my game.
so let me describe what I’m gonna do;
I’ve been working on an archer type enemy who gets to the top of the structures with the best angle to hit the Player, for that I created an EQS query which;

first, check the Z distance to the player and then prefer the greater score.

second, shoot a filter-only line trace towards the player with the bool match unchecked to find the best spot that he can see the player.

third, check the distance to the closest location.

the Issue is when I put multiple enemies in the game they all go to the same spot and then bunch up together, In order to prevent AIs to get bunched together, I acquired all valid query results as locations with EQS run mode on “Single random Item from best 25%”, but the issue is as the AIs reach the points they move to another one, I want them to stay where they are once they reach the points and not move until the player location changes and EQS gets updated to find better spots according to the player location, I was able to address the issue sort of by applying a simple blackboard decorator before the EQS runs to check if the AI sees the player or not.

later on, I found out that the AI will pass the player to reach the designated point of need so I needed to find a way for AI to kind of flank the player or at least stay away from the player sight to reach where It needs to be dynamical.
apologies for my poor English since English is not my native tongue.



2022-02-12_14-30-52_AdobeCreativeCloudExpress (1)

That was a great explanation!

I’d check to see if you can use the EQS system to see if you check if an enemy is targeting the same location or is occupying that location. Randomizing might not be the best course of action.

I’m not sure if you’re using AIMoveTo, but there is a way to generate a path as an array of vectors without asking the AI to move. I imagine at that point you can test if a point is close to the player and modify it to avoid the player. You’ll likely need to create custom code for moving to those points.

I had to play with navpoints for one of my games to get an enemy to move in more of a tank-like fashion.

Thank you for your response, I’ll try to do what you said and I’ll probably come by to ask questions again once again sorry for my late response

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms