Ok, in general I don’t want to create a new thread (it would be the fourth one regarding navigation) considering the “characters as navigation obstacles idea”, so I wanted to know whether the approach I describe below is proper.
-
In the Navigation tab of my StaticMesh asset I add a cylinder collision mask.
-
I set the AreaClass for this collision mask to a blueprint NavAreaForPaths I have created.
-
I set the radius of the cylindrical mesh to 15 (50 is the length and width of the StaticMesh)
-
In the NavAreaForPaths blueprint I set the default cost value to 5 and the entry cost to 2.
-
In the StaticMeshComponent of my character’ blueprint I change the CanEverAffectNavigation Property to true, so that the character is affecting the NavMesh increasing the path cost around itself.
And all of this sometimes works and sometimes does not. The characters clearly want to avoid one another. Nevertheless, they often follow a path which leads through the expensive NavArea, thus when a character reaches a path point located in such Area and consequently the NavAreaForPaths of one character starts to overlap with NavAreaForPaths of the other character, the character that is being navigated becomes enclosed in the expensive NavArea. Therefore, it no longer cares if the path leads through the costly area or not. It then wants to shorten its movement distance, which frequently results in a collision of the characters.