Try this:
a) Create your own class - child of ICrowdAgentInterface. For example:
UCLASS(BlueprintType)
class UCharacterCrowdAgentInterface: public UActorComponent, public ICrowdAgentInterface
{
GENERATED_UCLASS_BODY()
virtual FVector GetCrowdAgentLocation() const override;
virtual FVector GetCrowdAgentVelocity() const override;
virtual void GetCrowdAgentCollisions(float& CylinderRadius, float& CylinderHalfHeight) const override;
virtual float GetCrowdAgentMaxSpeed() const override;
virtual int32 GetCrowdAgentAvoidanceGroup() const override;
virtual int32 GetCrowdAgentGroupsToAvoid() const override;
virtual int32 GetCrowdAgentGroupsToIgnore() const override;
public:
virtual void InitializeComponent();
};
b) Overide this functions(can see UCrowdFollowingComponent ) + register it in Crowd Manager:
void UCharacterCrowdAgentInterface::InitializeComponent()
{
Super::InitializeComponent();
UCrowdManager* CrowdManager = UCrowdManager::GetCurrent(this);
if (CrowdManager)
{
ICrowdAgentInterface* IAgent = Cast<ICrowdAgentInterface>(this);
CrowdManager->RegisterAgent(IAgent);
}
}
c) Add it like component to your pawn (or character) (can do this in constructor of pawn class)