x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

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

Apologies if this post is against the 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 the modifier they just but up against it "sliding long" its walls.

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

w_jones

Product Version: Not Selected
Tags:
more ▼

asked Sep 30 '14 at 06:32 PM in Using UE4

avatar image

w_jones
136 5 11 18

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

3 answers: sort voted first

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

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.

more ▼

answered Oct 01 '14 at 02:59 PM

avatar image

nonder
136 13 22 33

avatar image w_jones Oct 02 '14 at 07:02 PM

Nonder

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

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

Any ideas ?

avatar image nonder Oct 02 '14 at 10:46 PM

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

  • Try to change color of your NavArea_CharacterOnly to something visible like blue.

  • 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 the 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 blue NavArea and I can see that mesh under NavModifier changes colour.

avatar image w_jones Oct 11 '14 at 05:04 PM

Nonder

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

The custom area class is has its "draw colour" set to bright purple, in the defaults section of the blueprint.

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

What am I doing wrong ?

avatar image w_jones Oct 11 '14 at 05:07 PM

Images...

alt text

alt text

alt text

navmesh_char.jpg (547.9 kB)
navmesh_null.jpg (572.4 kB)
avatar image nonder Oct 12 '14 at 10:41 AM

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

avatar image w_jones Oct 12 '14 at 01:48 PM

Nonder

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

Much appreciated :)

avatar image nonder Oct 20 '14 at 05:39 PM

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

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Hey w_jones,

If you use a NavModifierVolume, you can change the Area Class to NavArea_Null to adjust the NavMesh around it. This will let your vehicles navigate around it instead of sliding against it. The problem, however, is that this will affect the Nav Mesh for all AI. There is not currently a way to specify different responses to the 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 the pathing of vehicles manually when they approach the area you want them to avoid.

more ▼

answered Sep 30 '14 at 10:18 PM

avatar image w_jones Oct 01 '14 at 12:05 PM

Hey that's great news that your working towards that, thanks for the 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 the answer and all the effort you guys are putting into the engine, I am mightly impressed already !

avatar image Ben Halliday STAFF Oct 01 '14 at 07:50 PM

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..

avatar image Heoki Dec 11 '14 at 10:45 PM

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

avatar image Ben Halliday STAFF Dec 16 '14 at 10:49 PM

Hi Heoki,

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

avatar image wilberolive Sep 17 '16 at 11:22 PM

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

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

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

Many thanks Nonder.

more ▼

answered Mar 04 '15 at 09:04 PM

avatar image

w_jones
136 5 11 18

avatar image nonder Apr 15 '15 at 10:28 AM

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.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question