Replace the ThirdPerson character with a MixamoAnimPack character problem

Hi, I have a simple C++ project based on the ThirdPerson template, everything work fine. But I tried to change the Character into a MixamoAnimPack character that I downloaded from the marketplace, the character can be loaded and move around with animation via W, S, A, D keys, but it can’t be fully possessed by the player controller. for example, the collection sphere is not attached to the new character, and certain keyboard inputs don’t work. Any suggestions and help please ?

I have also tried following code in my GameMode class as follows, but it seems did nothing to allow the player controller to posses the new character.

AMyProjectGameMode::AMyProjectGameMode()
{

// set default pawn class to our Blueprinted character
static ConstructorHelpers::FClassFinder PlayerPawnBPClass(TEXT(“/Game/MixamoAnimPack/Mixamo_Kachujin/Mixamo_Kachujin”));
if (PlayerPawnBPClass.Class != NULL)
{
DefaultPawnClass = PlayerPawnBPClass.Class;
}
}

void AMyProjectGameMode::BeginPlay()
{
Super::BeginPlay();

// Set score to beat
AMyProjectCharacter* MyCharacter = Cast<AMyProjectCharacter>(UGameplayStatics::GetPlayerPawn(this, 0));

for (FConstPlayerControllerIterator It = GetWorld()->GetPlayerControllerIterator(); It; It++)
{
	APawn* MyPawn = Cast<APawn>(DefaultPawnClass);

	MyPlayerController = Cast<APlayerController>(*It);
	if (MyPlayerController && MyPlayerController->IsLocalController())
	{
		MyPlayerController->Possess(MyPawn);
	}
}

}

Thanks in advance

Hello wtang,

You mention a collection sphere. Is this something that was set up in the ThirdPersonCharacter class in code and/or Blueprints? If so, when you replace it with the Blueprint for the Mixamo character, it won’t have all of that logic. I would suggest replacing the skeletal mesh of the ThirdPersonCharacter instead of replacing the entire pawn.

Hi,
Thanks for your answer. The collection sphere is a sphere component that I setup in code:

AMyProjectCharacter::AMyProjectCharacter()
{
/ / Create the battery collection volume
CollectionSphere = CreateDefaultSubobject(TEXT(“CollectionSphere”));
CollectionSphere->AttachTo(RootComponent);
CollectionSphere->SetSphereRadius(200.f);

}

Please the attached image, the girl has no collection sphere attached to her. Therefore, all the code related to collection sphere doesn’t work.

Hi ,
I want to say a big thank you for your help. I followed your suggestions to replace the skeleton mesh and it works !!
Many thanks, being spent more than two days on this.