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"

Spawn a navmesh volume with blueprint

I'm trying to create a navmesh volume from blueprint.
So far i tried to spawn the volume with SpawnActor, but i should be missing some points as i can't figure it out how to make that work (i tried with BSP for testing purpose : it does not work either).

Any ideas how to create a volume with blueprint?


Product Version: Not Selected
sapwn_volume.jpg (34.3 kB)
more ▼

asked Dec 21 '14 at 01:37 AM in Blueprint Scripting

avatar image

3 3 4 7

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

1 answer: sort voted first

The shape of a Volume is define by BSP brushes, and these cannot be spawned at runtime. So even if you successfully spawn a NavMeshBoundsVolume actor it won't be fully functional.

What are you trying to do? Is spawning volumes is the only way to achieve what you want?



more ▼

answered Dec 21 '14 at 05:57 PM

avatar image

MieszkoZ STAFF
7.3k 223 57 412

avatar image Quidam-Craft Dec 21 '14 at 07:25 PM

Hi mieszko, thank you for the answer
What I try to achieve is to have a navmesh added on the map at specified location. The map is too big to cover it all from the editor.

Instead of spawning the volume would it be possible to copy a previously made volume for exemple ? I only succeed so far to move a volume not "duplicate" it.

avatar image MieszkoZ STAFF Dec 22 '14 at 06:02 PM

I have something in the works that will give you functionality you need (should be ready for 4.8). For now I suggest using a workaround, like having a pool of pre-created Volumes you move and scale at runtime.

avatar image Quidam-Craft Dec 22 '14 at 10:36 PM

Okay, i'll go for that in the meantime. Thanks for the upcomming functionality, and waiting for 4.8.

avatar image Zachary Carter Feb 15 '15 at 09:03 PM

Mike, would you mind elaborating on how exactly to scale a ANavMeshBoundsVolume instance in C++? I'm a bit confused on how one would do so at runtime with all the brush builder stuff - if that's even relevant.

avatar image MieszkoZ STAFF Feb 17 '15 at 12:32 PM

The trick I've used in one project was to have a unit-sized NavMeshBoundsVolume (1x1x1uu) and scale it at runtime like so:

 // hack-change modify frequency - otherwise SetActorLocation will fail.
 NavmeshBounds->SetActorLocation(MyBounds.GetCenter(), false);
 // redo modify frequency change

where MyBounds is an arbitrary FBox. This works in cooked builds as well. You might need to call UNavigationSystem::OnNavigationBoundsUpdated after such nav bounds scaling.

Hope it helps!


avatar image rajkosto Jun 21 '15 at 01:41 PM

Yo i'm in 4.8 what's this other method ? I really dont want to have to reference a 1x1uu existing volume.

avatar image MieszkoZ STAFF Jun 22 '15 at 09:30 AM

Navigation Invokers is what I had in mind, and that's indeed up and running in 4.8. There's unfortunately no documentation on it, but have a look at a (very rough) video I've recorded for it: https://drive.google.com/open?id=0Bwm0SVD0Nb8HdUExVUE1NmkzN2c

avatar image Maceo_P_King Jul 04 '15 at 09:36 PM

Thanks for sharing that video MieszkoZ ! I'm going to test out your system in a game i'm trying to develop. Because my entire level is being generated via blueprints (like the endless runner tutorial), i can put a huge navmesh bounds box and then generate the nav mesh as i go!

Not sure if it'll work, but without your work, i would've had no place to start! TY TY TY!!! :)

avatar image Shoiko Mar 14 '16 at 10:12 PM

requested access to said video. I am trying to get nav for my npcs and mob ai to work.

avatar image MieszkoZ STAFF Mar 14 '16 at 10:46 PM

The video has been move to this location: https://drive.google.com/open?id=0Bwm0SVD0Nb8HdUExVUE1NmkzN2c (updated the original comment as well)

avatar image Shoiko Mar 14 '16 at 11:16 PM

This is exactly what I've been looking for, this is literally the only source i found for how to set this up. <3 Am i allowed to post this in the UE4 community knowledge base? If the traffic is too much I can upload to youtube with references back to this post.

avatar image MieszkoZ STAFF Mar 15 '16 at 01:21 AM

feel free to share the link, but do not put it on youtube. I'll do it myself, but I need to ask right people first.

avatar image Shoiko May 17 '16 at 10:48 AM

Good day sir. I'm not sure if you have time but I have had much success with the invokers until trying to use them with persistent levels. As soon as i drop an invoker actor onto the map the editor crashes: https://answers.unrealengine.com/questions/421100/navigation-invokers-crashing-editor-when-used-with.html

(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