Can't create custom Detour Crowds AI controller in 4.12?

hey all! I am confused that i cant seem to be able to get the detour crowds ai controller to work. Here are the files for the custom controller class.

implementation of the controller class

#include "ProjectPastry.h"
#include "AIModule.h"
#include "Navigation/CrowdFollowingComponent.h"
#include "BaseAIController.h"

ABaseAIController::ABaseAIController(const FObjectInitializer& ObjectInitializer)
	: Super(ObjectInitializer.SetDefaultSubobjectClass<UCrowdFollowingComponent>(TEXT("CrowdFollowingComponent")))
{
	AIPerception = CreateDefaultSubobject<UAIPerceptionComponent>(TEXT("AIPerception"));
}

header file

#pragma once

#include "AIController.h"
#include "Perception/AIPerceptionComponent.h"
#include "BaseAIController.generated.h"

/**
 * 
 */
UCLASS()
class PROJECTPASTRY_API ABaseAIController : public AAIController
{
	GENERATED_BODY()

public:
	ABaseAIController(const FObjectInitializer& ObjectInitializer = FObjectInitializer::Get());

	UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = Sense)
	UAIPerceptionComponent* AIPerception;

};

in the BP class that inherits from this class just shows the default pathfollowingcomponent which tells me that this does not work.

I am also curious about that. Did you find any type of workaround to that problem?

I’m trying to implement a custom avoidance algorithm on top of the existing detour crowd navigation because its not avoiding other type of characters, such as the player. I’m working on a VR-application where it is pretty important that ai agents dont get stuck on the player.

Hope you can find the time to respond…

Cheers

I’m pretty sure you don’t use the FObjectInitializer any longer, I think you can now just create default subject on it

Tied to get game twin stick shooter to work error massage lost or missing modular must be made with
different engine

In your build.cs, you need to include AIModule in the dependancies

try to make game twin stick shooter got error message methanol
lost modules may be another engine

I’m new to UE4 C++. How do I create default subobjects other than using FObjectinitializer?

Just answered my own question by looking at the docs:

// Constructor Body   
// Create a new component and give it a name.
    WindPointSource = CreateDefaultSubobject<UWindPointSourceComponent>(TEXT("WindPointSourceComponent0"));

    // Set our new component as the RootComponent of this actor, or attach it to the root if one already exists.
    if (RootComponent == nullptr)
    {
        RootComponent = WindPointSource;
    }
    else
    {
        WindPointSource->AttachTo(RootComponent);
    }