Set SelfActor in Blackboard

This commit is contained in:
baz 2023-10-22 22:13:13 +01:00
parent 969ecbebc8
commit bab1f8acd6
1 changed files with 2 additions and 1 deletions

View File

@ -46,6 +46,7 @@ void AEnemyAIController::OnPossess(APawn* InPawn)
{ {
Blackboard->InitializeBlackboard(*behaviourTree->BlackboardAsset); Blackboard->InitializeBlackboard(*behaviourTree->BlackboardAsset);
BehaviorTree->StartTree(*behaviourTree); BehaviorTree->StartTree(*behaviourTree);
Blackboard->SetValueAsObject("SelfActor", enemy);
} }
//ensure(enemy->GetMovementComponent()->UseAccelerationForPathFollowing()); //ensure(enemy->GetMovementComponent()->UseAccelerationForPathFollowing());