Add Perception Source Stimuli to PlayerCharacter
This commit is contained in:
parent
40db233d6c
commit
9ed5da5792
|
@ -46,6 +46,10 @@ APlayerCharacter::APlayerCharacter()
|
|||
CharacterMovementComponent->AirControl = 1.0f;
|
||||
CharacterMovementComponent->bOrientRotationToMovement = true;
|
||||
|
||||
// Setup the character perception component
|
||||
PerceptionSource = CreateDefaultSubobject<UAIPerceptionStimuliSourceComponent>(TEXT("Perception Source Stimuli"));
|
||||
PerceptionSource->bAutoRegister = true;
|
||||
|
||||
this->Tags.Add(FName("Player"));
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue