Navigation around pawns that are dynamic obstacles

Hi there!

I don’t know if I understood the meaning of these settings correctly but:

I have a pawn “Minion” with an AI controller that can be commanded to move, using the MoveToLocation node.

Minions and the player characters have Capsule Colliders that have CanEverAffectNavigation and DynamicObstacle set to true and the AreaClass set to NavArea_Obstacle (NavArea_Null creates a similar unwanted result).

Now if I run and command the minions to move to location, their Obstacles don’t seem to move with them. Also if I command them to move behind the player, they just run into it and stop.

RuntimeGeneration in the project settings is set to Dynamic, and the navmesh updates when I eject and move objects around, but not when the player or the minions move by themselves.

Do I need to invoke an update of the mesh or something?

Thanks in advance!

284254-untitled.png

284257-untitled2.png

So by playing around a bit I found out that pawns have their own option “CanAffectNavigationGeneration” under the class defaults tab… -.- Activating this allows my AI to move around player pawns.

The minion pawns however shouldn’t have this activated however, as pointed out in this post. They basically block themselves from navigating correctly as they block the navigation around them. This’ll be solved by configuring CrowdControl in the Project Settings.

So all the pawns and their colliders should have CanEverAffectNavigation set to false. They should not be configured as DynamicObstacles either. Instead, player pawns should have the above mentioned configuration and AI pawns should avoid other AI using the crowd control system. Therefore AI pawns also need to have a DetourCrowdAIController (or one that inherits from it) possess them.

I thought I’ll leave it here if anyone else runs into this and doesn’t understand how this is done. I really had trouble finding anything clear on the internet and most of the tutorials didn’t seem to point this out.

Cheers
Lord

6 Likes

Thank you for the good information. Does enabling player pawns to afffect navigation impact performance? Do you have any experience about that?