Bind input in custom Actor

Thank you guys for replies.

fireapache@ Thank you for showing some example code. I know about this common solution however I would like to link input directly in my custom actor.
Marc Audy@ That it is possible. I had not think about that case and will do some more research later. I do not use engine source now but I tried this and input still does not work:


void ACOMCameraActor::Tick(float DeltaTime)
{
	Super::Tick(DeltaTime);

	Test++;

	if (Test == 60)
	{
		GEngine->AddOnScreenDebugMessage(-1, 1.f, FColor::Red, "60 NOW");
		EnableInput(PCOwner);
		if (InputComponent)
		{
			InputComponent->BindAction("CameraZoomIn", EInputEvent::IE_Pressed, this, &ACOMCameraActor::ZoomIn);
			InputComponent->BindAction("CameraZoomOut", EInputEvent::IE_Pressed, this, &ACOMCameraActor::ZoomOut);

			InputComponent->BindAction("EnableCameraRot", EInputEvent::IE_Pressed, this, &ACOMCameraActor::StartRotation);
			InputComponent->BindAction("EnableCameraRot", EInputEvent::IE_Released, this, &ACOMCameraActor::StopRotation);
		}
	}
}