Hi, Nonder!
When a controller possesses a pawn he calls the SetupPlayerInputComponent() procedure to bind its user controls. Then, I recommend you to put those bind definitions in that procedure!
Ex.:
DOFCharacter.h:
UCLASS()
class DECLINEOFFEAR_API ADOFCharacter : public ACharacter
{
...
protected:
virtual void SetupPlayerInputComponent(class UInputComponent *InputComponent) override;
...
}
DOFCharacter.cpp:
...
void ADOFCharacter::SetupPlayerInputComponent(class UInputComponent *InputComponent)
{
Super::SetupPlayerInputComponent(InputComponent);
check(InputComponent);
if (InputComponent)
{
InputComponent->BindAction("CameraZoomIn", EInputEvent::IE_Released, this, &ADOFCharacter::CameraZoomIn);
InputComponent->BindAction("CameraZoomOut", EInputEvent::IE_Released, this, &ADOFCharacter::CameraZoomOut);
}
}
...
See if it works for you!