Add Input Action for ThrowThrowable

This commit is contained in:
baz 2023-09-12 23:39:05 +01:00
parent fe6eca55c5
commit eea9ee49e6
2 changed files with 8 additions and 0 deletions

View File

@ -170,6 +170,11 @@ void APlayerCharacter::SetupPlayerInputComponent(UInputComponent* PlayerInputCom
Input->BindAction(AimDownSightsAction, ETriggerEvent::Completed, this,
&APlayerCharacter::EndAimDownSightsCallback);
}
if (ThrowAction)
{
Input->BindAction(ThrowAction, ETriggerEvent::Started, this, &APlayerCharacter::ThrowThrowable);
}
}
}

View File

@ -48,6 +48,9 @@ public:
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite)
UInputAction* SprintAction;
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite)
UInputAction* ThrowAction;
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite)
TSoftObjectPtr<UInputMappingContext> InputMappingContext;