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 To Spawn NavMesh in procedural Level

I've made procedural level but don't know how to spawn nav mesh inside it

Product Version: UE 4.12
Tags:
more ▼

asked Sep 21 '16 at 07:28 AM in Using UE4

avatar image

Mateusz88
0 2 3 8

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

1 answer: sort voted first

Hey Mateusz88,

This is a question that has actually been answered over on this thread: https://answers.unrealengine.com/questions/81497/how-to-build-navmesh-for-dynamically-sized-procedu.html

Head over there and you should be able to find some information that will help you get a good starting point!

Have a great day

more ▼

answered Sep 21 '16 at 07:51 PM

avatar image

Sean L ♦♦ STAFF
43.8k 485 152 440

avatar image Mateusz88 Sep 22 '16 at 06:07 AM

Thanks for response but still don't know how to do this only in blueprint

avatar image Sean L ♦♦ STAFF Sep 22 '16 at 03:06 PM

I'd recommend as Mieszko stated in the linked thread to just create a Nav Mesh Bounds Volume that scales the entire span of what you'd expect your level to be at maximum. That way you'll ensure that the Nav Mesh will generate on geometry that you spawn. Just ensure to set the runtime generation to dynamic on the Nav Mesh

avatar image Mateusz88 Sep 22 '16 at 04:20 PM

This could work but I don't know how big level will be because it will be created on the fly and will probably be endless. So I need to spawn nav mesh in blueprint

Concept is in link below https://www.youtube.com/watch?v=EifZOlZnEJc

avatar image Sean L ♦♦ STAFF Sep 23 '16 at 05:23 PM

What you'll need to do is initially place the Nav Mesh and then scale it using the method described in the post I linked. Here's the exact quote:

"I exposed the UNavigationSystem::OnNavigationBoundsUpdated function to Blueprints, and called SetActorScale3D on the NavMeshBoundsVolume in my level generation blueprint, and then called the OnNavigationBoundsUpdated node afterwards."

That should allow you to scale the Nav Mesh dynamically and ensure that it encompasses your entire level as it's generated.

You'll also need to keep in mind that you will need to degenerate parts of the level as you don't need them anymore or else the performance will be awful. Especially if you're generating a Nav Mesh for the entire thing.

avatar image Sansblaze Dec 28 '17 at 08:22 AM

hello, i have a lvl generated indefinitely and i try to move or scale my navmeshbounds I was told that there was no need to expose the function anymore, but i got an error when i try to reference my navmeshbounds with SetActorScale3D.. someone has an example of using the 'OnNavigationBoundsUpdated' node? or a way to attach my navmesh bounds to my player?

(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