I currently have a Parent C++ character class that contains basic code that different child classes can inherit from. In my child class I want to set up a player input component that will call a function to cast an ability that only that child class will use. However my child class implementation of setUpPlayerInputComponent never seems to be getting called.
Parent Class
void ABase_Character::SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent){
check(PlayerInputComponent);
PlayerInputComponent->BindAction("Jump", IE_Pressed, this, &ACharacter::Jump);
PlayerInputComponent->BindAction("Jump", IE_Released, this, &ACharacter::StopJumping);
PlayerInputComponent->BindAxis("MoveForward", this, &ABase_Character::MoveForward);
PlayerInputComponent->BindAxis("MoveRight", this, &ABase_Character::MoveRight);
PlayerInputComponent->BindAxis("Turn", this, &APawn::AddControllerYawInput);
PlayerInputComponent->BindAxis("TurnRate", this, &ABase_Character::TurnAtRate);
PlayerInputComponent->BindAxis("LookUp", this, &APawn::AddControllerPitchInput);
PlayerInputComponent->BindAxis("LookUpRate", this, &ABase_Character::LookUpAtRate);
PlayerInputComponent->BindTouch(IE_Pressed, this, &ABase_Character::TouchStarted);
PlayerInputComponent->BindTouch(IE_Released, this, &ABase_Character::TouchStopped);
}
Child Class
void ABeast::SetupPlayerInputComponent(UInputComponent * PlayerInputComponent) {
Super::SetupPlayerInputComponent(PlayerInputComponent);
PlayerInputComponent->BindAction("Special", IE_Pressed, this, &ABeast::ShadowMode);
}
void ShadowMode() { UE_LOG(LogTemp, Warning, TEXT("Ability Used")) }