DungeonCrawler-UE-C/Source/DungeonCrawlerUE/Variant_Combat/AI/CombatAIController.cpp
sandr fc08cd0c0b Initial commit – UE5 DungeonCrawler project mit Planung v4.2
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-11 22:17:14 +02:00

19 lines
545 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "CombatAIController.h"
#include "Components/StateTreeAIComponent.h"
ACombatAIController::ACombatAIController()
{
// create the StateTree AI Component
StateTreeAI = CreateDefaultSubobject<UStateTreeAIComponent>(TEXT("StateTreeAI"));
check(StateTreeAI);
// ensure we start the StateTree when we possess the pawn
bStartAILogicOnPossess = true;
// ensure we're attached to the possessed character.
// this is necessary for EnvQueries to work correctly
bAttachToPawn = true;
}