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"

Dynamic Navigation Mesh

Hey there,

I'm currently working on a third-person shooter where the player has the posibility to build objects inside the world to defend himself against enemy waves. I was wondering if it is possible to use a dynamic navigation mesh that updates everytime the player spawns an object. Maybe by using some kind of technique where you add the object to the navigation mesh as a point of intrest for the AI. I thought I could use an array of all the objects that where placed and when the AI get's near one of them he will attack them, but performance wise I don't think this will be completly optimized. Also when I spawn an object and the path is blocked by a spawned object the AI's navigation is broken because th AI still thinks he can pass.

Kind Regards Dyronix

Product Version: Not Selected
more ▼

asked May 06 '15 at 09:17 AM in C++ Programming

avatar image

115 12 15 89

avatar image Dyronix May 06 '15 at 03:25 PM

Thanks for the answer, I'll take a look at it.

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

1 answer: sort voted first

It's perfectly doable, and it's actually a really well tested use case since that's what Fortnite essentially does in terms of navigation. You need to make sure you have navmesh configured for runtime generation (do that via Project Settings -> Navigation Mesh -> Runtime Generation) and it should work out of the box.

A word of advice: whenever possible mark the items build-able by player as navigation obstacles (there's an option for that in Static Mesh editor, in Navigation section of the properties). The upside of using obstacles is that it's a lot faster to rebuild navmesh tiles. The downside is that obstacles annotate navmesh, but do not create new walkable areas, so creating an AI-walkable staircase with obstacles is not possible.

For more tips regarding tweaking navmesh generation see this twitch stream I did some time ago: https://www.youtube.com/watch?v=7LaazCv4rB0



more ▼

answered May 06 '15 at 02:52 PM

avatar image

MieszkoZ STAFF
7.3k 225 57 413

(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