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.