This commit is contained in:
Tyrel Souza 2018-02-20 23:28:58 -05:00
parent 93ab3251b7
commit 297fe4717c

View File

@ -36,7 +36,9 @@ void UGrabber::BeginPlay()
InputComponent = GetOwner()->FindComponentByClass<UInputComponent>(); InputComponent = GetOwner()->FindComponentByClass<UInputComponent>();
if (InputComponent) { if (InputComponent) {
UE_LOG(LogTemp, Warning, TEXT("%s has a InputHandle"), *(GetOwner()->GetName())); UE_LOG(LogTemp, Warning, TEXT("%s has a InputHandle"), *(GetOwner()->GetName()));
InputComponent->BindAction("Grab", IE_Pressed, this, &UGrabber::Grab)
InputComponent->BindAction("Grab", IE_Pressed, this, &UGrabber::Grab);
} else { } else {
UE_LOG(LogTemp, Error, TEXT("%s has no InputHandle"), *(GetOwner()->GetName())); UE_LOG(LogTemp, Error, TEXT("%s has no InputHandle"), *(GetOwner()->GetName()));
} }
@ -45,7 +47,7 @@ void UGrabber::BeginPlay()
// Raycast and grab what is in reach // Raycast and grab what is in reach
void UGrabber::Grab(){ void UGrabber::Grab(){
UE_LOG(LogTemp, Warning, TEXT("GRABBING!"));
} }