Space Plunder
Loading...
Searching...
No Matches
AALSAIController Class Reference

#include <ALSAIController.h>

Inheritance diagram for AALSAIController:

Public Member Functions

 AALSAIController ()
 

Public Attributes

TObjectPtr< UBehaviorTree > Behaviour = nullptr
 

Protected Member Functions

virtual void OnPossess (APawn *InPawn) override
 
virtual FVector GetFocalPointOnActor (const AActor *Actor) const override
 

Constructor & Destructor Documentation

◆ AALSAIController()

AALSAIController::AALSAIController ( )
9{
10}

Member Function Documentation

◆ GetFocalPointOnActor()

FVector AALSAIController::GetFocalPointOnActor ( const AActor * Actor) const
overrideprotectedvirtual
23{
24 if (Actor == nullptr)
25 {
26 return FAISystem::InvalidLocation;
27 }
28 const APawn* FocusPawn = Cast<APawn>(Actor);
29 if (FocusPawn)
30 {
31 // Focus on pawn's eye view point
32 return FocusPawn->GetPawnViewLocation();
33 }
34 return Actor->GetActorLocation();
35}

◆ OnPossess()

void AALSAIController::OnPossess ( APawn * InPawn)
overrideprotectedvirtual
13{
14 Super::OnPossess(InPawn);
15
16 if (Behaviour && InPawn)
17 {
18 RunBehaviorTree(Behaviour);
19 }
20}
TObjectPtr< UBehaviorTree > Behaviour
Definition ALSAIController.h:24

Member Data Documentation

◆ Behaviour

TObjectPtr<UBehaviorTree> AALSAIController::Behaviour = nullptr

The documentation for this class was generated from the following files: