Best Practice to exclude parts of navigation in random point search

mistercokes
Sun, 18 Oct 2020 19:50:58 +0000
Character & Animation

I am currently working on a system so builders can build a building and add resources to it. During the building period, people are free to walk over the construction site but as soon as the building is finished, they need to be taken off the construction site to avoid that they get stuck in the building.

I was setting up my building to teleport all people out of the area as follows.

Unfortunately, some of my buildings have the issue that navigation is generated at places which the characters cannot reach (see e.g. steps on the pyramid below). I cannot use “GetRandomReachablePointInRadius” to exclude those since the characters could e.g. be below the pyramid during the building spawn and it would not be possible for them to move to any outside navigation. Also, I cannot change the agent size since there are other places with very big unreachable fields (see the roof of the temple).

Is there some kind of solution to exclude the navigation which is on a building from the random point search? The building is dynamically generated during runtime.
C++ solutions are also welcome, as long as I could later use them in blueprint as well.

3 posts - 1 participant