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"

Is there a Blueprint method to manually rebuild nav mesh?

Hi, I would like to know if there is any way to rebuild the nav mesh manually using some blueprint command. I know that I can enable runtime rebuild of nav mesh. But I just want the rebuild to happen only when I do something specific like say add some new mesh to the level.

Product Version: Not Selected
Tags:
more ▼

asked Apr 02 '15 at 03:22 PM in Blueprint Scripting

avatar image

Stormrage256
972 82 75 117

avatar image Kokuyouseki Apr 29 '18 at 01:21 PM

Still no solution for this? https://answers.unrealengine.com/questions/38619/rebuild-navmesh-in-blueprint.html has some answer which didn't work for me, namely "Execute Console Command function with parameter RebuildNavigation". I want to stream in a level and then rebuild the navigation - would be best to only for said area. Maybe I will make a gigantic navmesh and add only a dynamic nav modifier to the streamed in level...

But even so I don't like the "just make it update all the time" approach. Seems really obvious to me to have a command to rebuild things such as this when needed instead of choosing "never" or "all the time". Would make optimalization much easier.

So far what I've tried: Dynamic Modifiers Only mode Persistent level has a huge navarea bounds volume, encompassing even the soon to be loaded level as well. Streamed in level has navarea modifiers set to default and a small area set up so it will fall into the original area of the persistent level when loaded, set to null..

When streaming in the new modifier volumes the null one blocks off the area from the original persistent level properly BUT the ones set to default do not add the new area. If set to full runtime update then yes, the new area, as covered, will be added but that's irrelevant here.

The important thing is that while the null modifier worked the default one did not - so this approach doesn't work (so far) as the area that wasn't built up won't be even if it's covered and has a dynamic modifier asking for it to be used as a default navarea. (Added navmes to streamed level as well, no effect).

Maybe if I used invokers... but... well... a "rebuild navigation" command would solve it so easily.

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

1 answer: sort voted first

AFAIK, there is no need for such functionality. With Project Settings > Navigation > Runtime Generation set to Dynamic, anything within the navmesh volume automatically updates any blocking volumes which occur at runtime. So if you were to spawn a mesh which blocks part of the navmesh volume, it would update accordingly on the next tick. As for updating the bounds of the navmesh volume itself, I believe I've read somewhere how this is possible, but I can't remember if it was available via blueprints or only in C++. But your best bet is to simply set it to the maximum size that it will be in your project, and create temporary blocking volumes where you wish to cut off navigation.

If you could provide a use case where the above does not apply for your particular project, then perhaps someone could better assist you. Otherwise, just use Dynamic runtime generation.

more ▼

answered Aug 06 '15 at 08:35 AM

avatar image

MichaelWion
245 23 39 49

avatar image Stormrage256 Aug 06 '15 at 08:43 AM

I went ahead with runtime dynamic rebuild for my project. It works that way, but if I could turn it on/off on the move, it would help optimize the game. I have two modes in my game, the first one requires nav mesh rebuild as I'm placing objects on the level. In the second mode, I would rather turn it off, as it's completely combat focused and hence do not require the nav mesh to rebuild.

avatar image James Steininger Jul 27 '16 at 06:03 AM

Setting it to Dynamic causes 20-40 ms to be added to the game time for our project. Setting it to Dynamic Modifiers Only is much better and only adds 0-2 milliseconds. However, we have dynamic objects which change location, and we aren't sure how to get those actors to receive updated nav data-right now the object moves and the nav mesh stays in the same place.

(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