Source/SimpleShooter/ShooterCharacter.cpp
// Called to bind functionality to input
Called to bind functionality to input
Called to bind functionality to input
void AShooterCharacter::SetupPlayerInputComponent(UInputComponent *PlayerInputComponent)
{
    Super::SetupPlayerInputComponent(PlayerInputComponent);
    PlayerInputComponent->BindAxis(TEXT("MoveForward"), this, &AShooterCharacter::MoveForward);
    PlayerInputComponent->BindAxis(TEXT("Strafe"), this, &AShooterCharacter::Strafe);
    PlayerInputComponent->BindAxis(TEXT("LookUp"), this, &APawn::AddControllerPitchInput);
    PlayerInputComponent->BindAxis(TEXT("LookRight"), this, &APawn::AddControllerYawInput);
    PlayerInputComponent->BindAxis(TEXT("LookUpRate"), this, &AShooterCharacter::LookUpRate);
    PlayerInputComponent->BindAxis(TEXT("LookRightRate"), this, &AShooterCharacter::LookRightRate);
    PlayerInputComponent->BindAction(TEXT("Jump"), EInputEvent::IE_Pressed, this, &ACharacter::Jump);
    PlayerInputComponent->BindAction(TEXT("Shoot"), EInputEvent::IE_Pressed, this, &AShooterCharacter::Shoot);
}
void AShooterCharacter :: SetupPlayerInputComponent ( UInputComponent * PlayerInputComponent ) { Super :: SetupPlayerInputComponent ( PlayerInputComponent ) ; PlayerInputComponent -> BindAxis ( TEXT ( " " ) , this , & AShooterCharacter :: MoveForward ) ; PlayerInputComponent -> BindAxis ( TEXT ( " " ) , this , & AShooterCharacter :: Strafe ) ; PlayerInputComponent -> BindAxis ( TEXT ( " " ) , this , & APawn :: AddControllerPitchInput ) ; PlayerInputComponent -> BindAxis ( TEXT ( " " ) , this , & APawn :: AddControllerYawInput ) ; PlayerInputComponent -> BindAxis ( TEXT ( " " ) , this , & AShooterCharacter :: LookUpRate ) ; PlayerInputComponent -> BindAxis ( TEXT ( " " ) , this , & AShooterCharacter :: LookRightRate ) ; PlayerInputComponent -> BindAction ( TEXT ( " " ) , EInputEvent :: IE_Pressed , this , & ACharacter :: Jump ) ; PlayerInputComponent -> BindAction ( TEXT ( " " ) , EInputEvent :: IE_Pressed , this , & AShooterCharacter :: Shoot ) ; }
Called to bind functionality to input
Called to bind functionality to input