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"

NavMesh and Proceduraly generated map, FindPathToLocationSyncroniously does not work

Hi, i try to generate a procedural map, https://www.youtube.com/watch?v=VmRggTwhiew following this tutorial Map is generated properly. Problems start when i try to check if my placed tile is reachable or not. I want to generate dungeon, but i wan tall rooms to be accessible and end goal reachable. so that generated tiles would not obstruct access to end goal. I though, that after placement of tile i could us "FindPathToLocationSynchroniously" to check if that place is reachable. But, it does not work for generated map. If i use static ground, not generated, it can reach all points, even it i know there is no way to reach it. If i dont use static ground, it fails to reach any point, even i fill the ground only with tiles that can be walked on. it seems that "FindPathToLocationSynchroniously" does the test prior the tile is placed, on static ground only.

Product Version: UE 4.20
more ▼

asked Aug 11 '18 at 11:00 AM in Blueprint Scripting

avatar image

6 1 2

avatar image Lauriui Aug 11 '18 at 11:02 AM

does anyone know how to make it work after tile placement? as delay did not help, link text

log.txt (146.1 kB)
(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

There is a free example template project called TurneBasedStrategy made by the Unreal team that deals with procedural generated room.

They also have live training video on the same project in YouTube.

I hope this helps you.

more ▼

answered Aug 11 '18 at 12:13 PM

avatar image

1.2k 6 5 8

avatar image mightyenigma Sep 07 '18 at 10:13 PM

However, in the TurnBasedStrategy project, it does not use the NavMesh. It doesn't use that system - instead they programmed in the A* algorithm we all know and love from our computer science classes in college and/or high school.

So that will not answer the question of how to use NavMesh with Moveable or dynamic static meshes. It does solve the problem in a completely different way, but I would like to know if Moveable meshes can be NavMeshed onto, myself.

avatar image dZh0 Sep 10 '18 at 08:44 AM

Although you are technically right and this does not solve NavMesh in generated levels I though it would be useful for the OP to see how the generation is made by the UE4 team.

My point being, you should NOT need to check if a point is reachable in your generated level using the NavMesh. You should generate your level so that each room is reachable by definition not randomly generating it and then buteforcing every point of interest. Think of your tiles and rooms as a jigsaw puzzle - the entrances to the rooms are your "tabs" and "blanks" and you should not place a tile that will cover the last remaining entrance.

There are quite a lot of maze generating algorithms that can be applied to level generation and it's kind of a creative process to write a nice level generator.

As for the movement:

I believe the A* is used to determine your unit's movement radius in the grid space and generate the waypoints. I'm sure they use MoveTo() however I don't know if bUsePathfinding set to true.

There is probably a way to generate the NavMesh at after the level generation but I'll have to check that later.

avatar image dZh0 Sep 10 '18 at 08:57 AM

For the movement: You cold probably use Navigation Invokers depending on the size of your generated level.

...either on the pawns or the tiles themselves.

(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