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"

Long navigation path issue

Hello!

I have an issue with the long paths for pathfinding: I use "FindPathToLocationSynchronously" function in C++ implementation to find my custom pawn's path and it works fine until I place the pawn far enough. I thought that the path just didn't exist, however it looks like if I place my pawn just a bit closer it starts to navigate correctly.

It is demonstrated well on the pictures below. Is it a bug or I'm missing some "max path length" settings there?

1) Path is not found alt text

2) Path is found very well after just slight movement alt text

The path length is about 41600 cm in the second case. The engine version I use is 4.7.6.

Thank you in advance!

Product Version: Not Selected
Tags:
1.png (2.4 MB)
2.png (2.3 MB)
more ▼

asked Apr 24 '15 at 08:11 PM in Using UE4

avatar image

KeltRivera
128 4 7 111

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

1 answer: sort voted first

The limit is not on the path length, it's on number of navigation nodes processed while looking for it. In general it's not recommended to search for long paths with A* since pathfinding cost grows exponentially with pathing distance.

But if you really wanted to do that you can modify the node-pool size used by A* by changing RecastNavMesh.DefaultMaxSearchNodes. It's not exposed anywhere so you'd need to add it to DefaultEngine.ini, like so:

 [/Script/Engine.RecastNavMesh]
 DefaultMaxSearchNodes=4096

The default value is 2048.

Cheers,

--mieszko

more ▼

answered Apr 24 '15 at 08:41 PM

avatar image

MieszkoZ STAFF
7.4k 225 57 415

avatar image KeltRivera Apr 25 '15 at 03:57 PM

Knowing the cause of this problem I've changed navmesh properties to have less navigation nodes total. It worked for me for now. Thank you!

(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