add navgen option walkableRadiusFactor #2948
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There is a margin between the edge of a navmesh, and the actual geometry causing this edge. Look at the level4 navmesh on map antares for example:
Notice how these margins cause a gap in the navmesh, where the white circle is. The tyrant bots will not leave their base on this path, despite the fact that a tyrant fits in there.
This is very unfortunate, as there is a similar gap at the other exit as well. So tyrant bots cannot leave their base.
The margin is controlled by a value
walkableRadius
we tell recast to use. Add a navgen optionwalkableRadiusFactor
, to tweak this value. For example, create a filegame/maps/antares.navcfg
:Restart, and look at the same navmesh:
There is one other important reason to keep the margins as small as we can: bots will only pick enemy buildings as targets if their origin is over the navmesh (with minor exceptions).
This is a very dangerous value to tweak. Make the margin too small, and bots might get stuck at little edges on the walls.