So I have a number of AI entities running around and using Detour Crowds, which is great, however they aren’t avoiding the player character, which leads to some awkward situations.
Actors that should be avoided, but are not being simulated by crowd (like players) should implement CrowdAgentInterface AND register/unregister themselves with crowd manager:
UCrowdManager* CrowdManager = UCrowdManager::GetCurrent(this); if (CrowdManager) { CrowdManager->RegisterAgent(this); }
So I created a MyCharacterC based on Character.h, that I plan on reparenting my MyCharacter blueprint to. I added
#include “Navigation/CrowdFollowingComponent.h”
to the headers, but I am not sure of where to define the UCrowdManager class, or where to execute that line.