How to use DetourCrowds

Hello, I’d like to use the new DetourCrowd feature for a RTS type of game.

I’ve extended AIController in C++, and switched the PathFollowingComponent with a CrowdFollowingComponent.
But I have no idea how to take advantage of the DetourCrowds, My units seems to behave the same way than with the PathFollowingComponent, execpt that they sometime don’t move at all.

Any Information on how to get my AI to use DetourCrowds would be welcom.

my AIController cpp :

#include "quizMobile.h"
#include "TOW_CrowdAIController.h"


ATOW_CrowdAIController::ATOW_CrowdAIController(const class FPostConstructInitializeProperties& PCIP)
  : Super(PCIP.SetDefaultSubobjectClass<UCrowdFollowingComponent>(TEXT("PathFollowingComponent")))
{
	
}

my AIController .h

#pragma once

#include "AIController.h"
#include "Navigation/CrowdFollowingComponent.h"
#include "TOW_CrowdAIController.generated.h"


/**
 * 
 */
UCLASS()
class QUIZMOBILE_API ATOW_CrowdAIController : public AAIController
{
	GENERATED_UCLASS_BODY()

	
	
};

I’m currently extending this custom class in blueprint, and using the “Move to Location” function in blueprint.
I have little knowledge in C++, but any solution using C++ would be welcome as well.

I have the same problem! Could anyone from Epic help us?

Make sure that you are not using RVO from CharacterMovementComponent (bUseRVOAvoidance = false), since it will take priority. Apart from that, your code should work. You can verify it by turning on debug drawing (CrowdManager.cpp, CrowdDebugDrawing::bDebugSelectedActors = true) and selecting moving pawn in editor.

As for not moving at all: when does it happen? is it related to some parts of level geometry? moving really long distance? collisions between pawns?

Hello, thank you for answering, actually, it started working after rebooting the Engine wich is weird because the AI already showed the crowd component in the blueprint component panel at the time I wrote the question. And, if 50 units have been spawned already, the new units that I spawn won’t be able to move. I’ll just go through the crowd component class, there must be a variable helping with that I guess.

50 agents limit is currently hardcoded in CrowdManager’s constructor. It should be changed into config value, but for now just increase MaxAgents variable to suit your game.

I think I turned on the debug, because I am getting messages from the crowd component in my visual logger but in terms of what I see when I click on an actor is nothing more than the regular AI debug info, what are we expecting to see? Also I had some trouble setting the debug to true because the namespace was in the .cpp and I couldn’t include the AIPrivateModule.h, so I changed the value of the variable in the crowdmanager.cpp directly, I don’t know if that worked though?

@JKDev How did you turn on the CrowdDebugDrawing::bDebugSelectedActors?

Do I need to pull the engine source code and rebuild it?