diff --git a/Source/Nakatomi/PlayerCharacter.cpp b/Source/Nakatomi/PlayerCharacter.cpp index e2a2fe0..d19c05d 100644 --- a/Source/Nakatomi/PlayerCharacter.cpp +++ b/Source/Nakatomi/PlayerCharacter.cpp @@ -46,6 +46,10 @@ APlayerCharacter::APlayerCharacter() CharacterMovementComponent->AirControl = 1.0f; CharacterMovementComponent->bOrientRotationToMovement = true; + // Setup the character perception component + PerceptionSource = CreateDefaultSubobject(TEXT("Perception Source Stimuli")); + PerceptionSource->bAutoRegister = true; + this->Tags.Add(FName("Player")); } diff --git a/Source/Nakatomi/PlayerCharacter.h b/Source/Nakatomi/PlayerCharacter.h index a15fa22..98aa33b 100644 --- a/Source/Nakatomi/PlayerCharacter.h +++ b/Source/Nakatomi/PlayerCharacter.h @@ -12,6 +12,7 @@ #include "Engine/EngineTypes.h" #include "Engine/DamageEvents.h" #include "Blueprint/UserWidget.h" +#include "Perception/AIPerceptionStimuliSourceComponent.h" #include "PlayerCharacter.generated.h" class UInputAction; @@ -80,6 +81,8 @@ private: class UUserWidget* currentPlayerHUD; + UAIPerceptionStimuliSourceComponent* PerceptionSource; + public: // Sets default values for this character's properties APlayerCharacter();