# Child setUpPlayerInputComponent

**URL:** <https://forums.unrealengine.com/t/child-setupplayerinputcomponent/373597>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [October 17, 2016, 4:35pm UTC](https://forums.unrealengine.com/t/child-setupplayerinputcomponent/373597 "2016-10-17T16:35:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_421c70fa](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_421c70fa](https://forums.unrealengine.com/u/anonymous_user_421c70fa)\
**Post date:** [October 17, 2016, 4:35pm UTC](https://forums.unrealengine.com/t/child-setupplayerinputcomponent/373597/1 "2016-10-17T16:35:18Z")

</div>

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")) }

```

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [October 17, 2016, 5:15pm UTC](https://forums.unrealengine.com/t/child-setupplayerinputcomponent/373597/2 "2016-10-17T17:15:43Z")

</div>

Hey AAjax-

Did you set the Default Pawn Class to use the ABeast class / blueprint in your game mode? If not it my be using the wrong character which doesn’t have the same bindings you’ve setup. If possible please include a screenshot of your World Settings for more information.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_421c70fa](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_421c70fa](https://forums.unrealengine.com/u/anonymous_user_421c70fa)\
**Post date:** [October 17, 2016, 6:57pm UTC](https://forums.unrealengine.com/t/child-setupplayerinputcomponent/373597/3 "2016-10-17T18:57:16Z")

</div>

that was it, I had the default pawn class assigned to the parent class! Thank you very much

---

<div class="post-metadata">

**Author:** ![aleksei.kanash](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@aleksei.kanash](https://forums.unrealengine.com/u/aleksei.kanash)\
**Post date:** [July 5, 2018, 10:03pm UTC](https://forums.unrealengine.com/t/child-setupplayerinputcomponent/373597/4 "2018-07-05T22:03:10Z")

</div>

If you spawns your own character - you should to possess player controller on it.
