From 68d9fafdf6628dfcba3beff222ff603bb28ebfce Mon Sep 17 00:00:00 2001 From: Ji Yoon Rhee Date: Mon, 10 Jun 2024 18:41:00 +0900 Subject: [PATCH] added input action reference for walking, binded IA_Walk to Move() function --- hwanyoung2/Source/hwanyoung2/hwanyoung2Character.cpp | 3 +++ hwanyoung2/Source/hwanyoung2/hwanyoung2Character.h | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/hwanyoung2/Source/hwanyoung2/hwanyoung2Character.cpp b/hwanyoung2/Source/hwanyoung2/hwanyoung2Character.cpp index f8555b8f..50bfa579 100644 --- a/hwanyoung2/Source/hwanyoung2/hwanyoung2Character.cpp +++ b/hwanyoung2/Source/hwanyoung2/hwanyoung2Character.cpp @@ -117,6 +117,9 @@ void Ahwanyoung2Character::SetupPlayerInputComponent(class UInputComponent* Play //Moving EnhancedInputComponent->BindAction(MoveAction, ETriggerEvent::Triggered, this, &Ahwanyoung2Character::Move); + + //Walking + EnhancedInputComponent->BindAction(WalkAction, ETriggerEvent::Triggered, this, &Ahwanyoung2Character::Move); //Looking EnhancedInputComponent->BindAction(LookAction, ETriggerEvent::Triggered, this, &Ahwanyoung2Character::Look); diff --git a/hwanyoung2/Source/hwanyoung2/hwanyoung2Character.h b/hwanyoung2/Source/hwanyoung2/hwanyoung2Character.h index 66f0387e..96bdc9a1 100644 --- a/hwanyoung2/Source/hwanyoung2/hwanyoung2Character.h +++ b/hwanyoung2/Source/hwanyoung2/hwanyoung2Character.h @@ -43,6 +43,10 @@ class Ahwanyoung2Character : public ACharacter UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input, meta = (AllowPrivateAccess = "true")) class UInputAction* LookAction; + /** Walk Input Action */ + UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input, meta = (AllowPrivateAccess = "true")) + class UInputAction* WalkAction; + #pragma endregion private: