AddMovementInput Not Working

Im currently facing the issue when using my custom character pawn I dont receive inputs for forward and right axis.

Here is my custom game mode:

ATorchGameMode::ATorchGameMode()
{
  DefaultPawnClass = ATorchTPSCharacter::StaticClass();
  PlayerControllerClass = ATorchTPSController::StaticClass();
  GameStateClass = ATorchGameState::StaticClass();
}

If I were to comment out the “DefaultPawnClass” it uses the default pawn which works well.
It is rather strange behaviour since “AddMovementInput” seems to be used in both classes.

I have also debugged engine code. So the axis mapping is the same in both the default pawn and my custom pawn.
So this function seems to work correctly!

void APawn::Internal_AddMovementInput(FVector WorldAccel, bool bForce /*=false*/)
{
	if (bForce || !IsMoveInputIgnored())
	{
		ControlInputVector += WorldAccel;
	}
}

Somewhere along searching for a solution I found this thread (https://forums.unrealengine.com/t/ignoring-add-movement-input-again/97913) pointing out that “AddMovementInput” doesn’t work if your “CustomGameModeBase” isn’t also using “CustomGameStateBase”, which I also did but it didn’t work.

So I was messing with this today and figured it out.

In my constructor I was assigning the animation blueprint programmatically and that somehow worked in the past but stopped suddenly.

Here is the code that I now commented out from my character constructor:

static ConstructorHelpers::FObjectFinder<UAnimBlueprint> animationBlueprint(TEXT("AnimBlueprint'/Game/Torch/Characters/Animations/TorchTPSAnimation_BP.TorchTPSAnimation_BP'"));
 if (animationBlueprint.Succeeded())
 {
   GetMesh()->SetAnimClass(animationBlueprint.Object->GetAnimBlueprintGeneratedClass());
 }

I’ve changed it to this:

GetMesh()->SetAnimClass(animationBlueprint.Object->StaticClass());