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 a NavModifierVolume in C++

I can't seem to figure out how to spawn a NavModifierVolume into the world in C++ and set its box brush shape size and area class? Can anyone please show me example code of how to do this?

Product Version: UE 4.13
Tags:
more ▼

asked Sep 30 '16 at 04:10 AM in C++ Programming

avatar image

wilberolive
295 27 45 47

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

1 answer: sort voted first

There's no way to dynamically create fully functional Volumes in UE4, sorry. But you don't have to. Just create an actor that would implement INavRelevantInterface, similarly to how NavModifier does.

Cheers,

--mieszko

more ▼

answered Sep 30 '16 at 02:46 PM

avatar image

MieszkoZ STAFF
7.3k 223 56 410

avatar image wilberolive Oct 05 '16 at 05:30 AM

Thanks Mieszko for the sad news.

Perhaps your AI wisdom can suggest an alternative idea to my issue. My game world is composed of a 100x100 grid of tiles. So I assume spawning 10,000 actors (implementing INavRelevantInterface) would be a bad idea?

I need a way to dynamically (changes throughout the game) set the movement cost of tiles for the AI so they avoid walking on certain tiles unless they have to (i.e. no other path). I considered implementing A*, but I don't want the AI to walk rigidly from tile to tile. I still want them to walk freely around the grid like they do with the navmesh.

avatar image LDOGLONDON Jan 08 '19 at 06:38 PM

Hey @MieszkoZ , if you wouldn't mind, I have a related question here: https://answers.unrealengine.com/questions/863645/view.html

(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