Unfortunately I don’t have the option to use bPressedJump.
Here’s an idea of what I’m doing, this is the Game Mode:
DefaultPawnClass = AMainCharacter::StaticClass();
PlayerControllerClass = AMainCharacterKeyboard::StaticClass();
And the Keyboard Controller:
APawn* Pawn = GetPawn();
Then I’m able to do stuff like this:
void AMainCharacterKeyboard::MoveX(float Value)
if (Sprinting) Value *= 2.0f;
if (MovementDebug) GEngine->AddOnScreenDebugMessage(-1, 0.005f, FColor::Green, FString::Printf(TEXT("Moveing X %f"), Value));
if (Value != 0.0f && (Pawn != NULL))
// add movement in that direction
The AMainCharacterKeyboard is a PlayerController and the AMainCharacter is a Character (although this is a Pawn when I retrieve it from the GameMode via GetPawn() in AMainCharacterKeyboard).