How to make character navigate around navmodifiers they are blocked from?

Apologies if this post is against wrong topic, I couldn’t see one for AI.

I have a navmodifier setup inside a navmesh, that blocks certain types (vehicles), but instead of navigating around modifier they just but up against it “sliding long” its walls.

What I really want is for vehicles to navigate around navmesh modifier as if it were a building or other solid object, but non vehicle characters to use nav mesh volume as normal, is there a way of doing this ?

w_jones

Hey w_jones,

If you use a NavModifierVolume, you can change Area Class to NavArea_Null to adjust NavMesh around it. This will let your vehicles navigate around it instead of sliding against it. problem, however, is that this will affect Nav Mesh for all AI. There is not currently a way to specify different responses to Nav Mesh, but there is work being done to allow layered Nav Meshes for separate AI types. Unfortunately we do not have a current timeline for its implementation.

For now, you may need to use Target Points or something similar and adjust pathing of vehicles manually when they approach area you want them to avoid.

Hey that’s great news that your working towards that, thanks for answer. I don’t suppose we know when that feature is going to be ready ?

Another train of thought occurred to me, what happens if I have 2 navmeshs next to each other ? are characters able to traverse navmesh boundaries to get to where they are told to go to …??

Genuine thanks for answer and all effort you guys are putting into engine, I am mightly impressed already !

I think you can do this very easily using NavArea and NavigationQueryFilter :slight_smile:

1. Create new blueprint from class NavArea, you can name it NavArea_CharacterOnly
You can specify there some things like color of nav mesh for this area, cost of movement and so on. But you don’t need to change anything there if you don’t want to.

2. Create new blueprint from class NavigationQueryFilter, you can name it NavQueryFilter_Vehicle

3. Open default properties of this blueprint and add 3 new Areas: NavArea_Default, NavArea_Null and your custom NavArea created in step 1 = NavArea_CharacterOnly. For NavArea_Null and NavArea_CharacterOnly toggle checkbox “Is Excluded?” to true - this will disable navigation for these zones.

4. Place same NavModifier to your level and set Area Class in properties to your custom NavArea_CharacterOnly. Navigation mesh will change color to color of your nav area specified in blueprint of NavArea_CharacterOnly.

5. Using filters is very easy too, movement blueprint nodes like Move To Location, Move To Actor (AIController class) have input dropdown where you can select filter for navigation. Select there your custom NavigationQueryFilter_Vehicle created in step 2.

We don’t have a date for it yet, but it is actively being worked on now.

Nav Meshes can overlap, and your characters will be able to move between them without any trouble…

Nonder

I don’t seam to be able to get that to work. Every character ignores just moves through NavModifier that I set to CharacterOnly.

Also generated nav mesh is all one colour (default green) my navmesh modifier doesn’t change colour of mesh, so I suspect that modifier isn’t generating a mesh for itself, and my characters are simply using standard one…

Any ideas ?

Here are some tips that can help you to debug your issue:

  • Try to change color of your NavArea_CharacterOnly to something visible like .
  • Set NavModifier volume Area Class to NavArea_Null and see if navigation mesh automatically disables for this area. If not then your mesh is not dynamically rebuilding our your NavModifier is bad placed, so it does not intersect mesh. There are many threads about this. If your nav mesh automatically disables on this area then your NavModifier Volume is Ok and you can set there your custom NavArea_CharacterOnly

I suspect that modifier isn’t
generating a mesh for itself

It works little different. It does not generate separated mesh. It just edits current one. I tested it with NavArea and I can see that mesh under NavModifier changes colour.

Nonder

I don’t think its working for me, I attach 2 images on with navmodifier set to custom AreaClass and one with same area set to navarea_null

custom area class is has its “draw colour” set to bright purple, in defaults section of blueprint.

one with custom area simply shows a normal green unbroken nav mesh, where as one with NavModifier set to null shows navmesh not covering that modifiers area.

What am I doing wrong ?

Images…

That is very strange. I will record video tutorial for you very soon, so you can check if you do everything right.

Nonder

Thanks buddy, I feel I am getting 1 on 1 tech support and I should be paying for this help !!

Much appreciated :slight_smile:

Sorry for delay, We are finishing one project and I am quite busy these days.

Has there been any update on this feature or is it still being worked on?

Hi Heoki,

There hasn’t been anything implemented yet. I will update this post when I see anything come through. Thanks for your patience!

Sorry for delay, this is now working as Nonder said it would.

Many thanks Nonder.

Oh, really sorry, I lost track of this question for some reason. I was not working with UE4 for long time and now I am back. I tested that again today and I can confirm it works in 4.7.5 too. I am glad it works for you too. If everything is ok you can mark that answer as valid, so others will know it does work.

I know it is two years later, but just wondering if anything ever came of layered nav mesh work?