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"

How do you disable/enable NavMesh using NavModifierVolume with triggers

Heya :)

I've got a case where I want to be able to disable/enable the NavMesh in certain areas with a triggerbox, but I'm having a bit of trouble getting it working. The initial state will have the NavMesh in this area start off disabled and then change to become active upon being triggered.

I've tried setting up a NavModifierVolume, setting it's starting AreaClass to NavArea_Null. Then setting up a level blueprint triggering a Set Area Class where it's set to have None/NavAreaDefault with the NavModifierVolume being referenced as the target. However this doesn't seem to work, and I've been unable to find anyone else having issues with this here.

It is possible to get rid of the blocking NavModifierVolume by using Destroy Actor on it instead, but I kinda want to be able to enable it as well.

Cheers,

-Mazy

Product Version: Not Selected
Tags:
more ▼

asked Apr 23 '15 at 11:22 AM in Blueprint Scripting

avatar image

Mazy.UltraUltra
3 1 2 3

(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first

Okay so I actually managed to get that to work for our part. I created a new type of NavArea which was traversable by default and made a NavigationQueryFilter in which we exclude the new NavArea.

Then it is simply a matter of switching between those two filters.

more ▼

answered Apr 27 '15 at 06:49 AM

avatar image

Robin.UltraUltra
36 2 5 8

(comments are locked)
10|2000 characters needed characters left

I was about to suggest runtime setting navigation area class of the volume, but I just confirmed what you report that it doesn't work. It's a bug and I'm going to fix it ASAP. Unfortunately other then that I don't have a way to toggle big chunks of navmesh :/

But do you really need that? Why? Can you explain why you need that? It's usually enough to just remove connections on navmesh, so that the "disabled" part is simply unreachable. Can you explain why this wouldn't work for you?

Cheers,

--mieszko

more ▼

answered Apr 23 '15 at 12:54 PM

avatar image

MieszkoZ STAFF
7.3k 223 56 410

avatar image Mazy.UltraUltra Apr 23 '15 at 01:38 PM

Ah aight, thanks.

It's for a test I'm mocking up where I essentially want to block AI characters from running through liquids/areas at certain times, the idea being that I'd enable/disable the navmodifiervolume in the areas with the liquids to do this. What do I have to do to remove connections on the navmesh? If that'll work for this scenario then I'm all ears ;)

avatar image MieszkoZ STAFF Apr 23 '15 at 03:01 PM

I wanted to suggest using BlockingVolumes but it turns out in 4.7 this doesn't work neither :/ Already fixed for 4.8, but its shipping in like a month from now.

So I've spend a moment looking for a workaround and the only thing I could find is BlockingVolume scaling. You need to put a "high" blocking volume on the area you want to cut off. Make sure the root location is above where AI heads will be. Then if you want to "open" the are you scale the volume in Z axis to something really small. This will get applied to navmesh. Scaling back will work as well.

You won't need this hack in 4.8, but like I said, it's still a way off. I'm terribly sorry!

Let me know if you encounter issues with this hack-approach.

avatar image Mazy.UltraUltra Apr 24 '15 at 08:23 AM

Hehe that's alright, knowing that it's being worked on is good to hear :)

I'll try out the workaround with the BlockingVolumes, or perhaps try moving them up in the Z axis (that would work as well in this test scene, tho I guess scaling would work just as well).

avatar image MieszkoZ STAFF Apr 24 '15 at 11:51 AM

I suggested scaling because moving won't work :D

avatar image Robin.UltraUltra Apr 27 '15 at 06:23 AM

Does this mean a solution where we switch between two different NavigationQueryFilters won't work either ?

(comments are locked)
10|2000 characters needed characters left
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