engine
 
载入中...
搜索中...
未找到
所有成员列表
FCrowdAvoidanceConfig结构体 参考

Crowd manager is responsible for handling crowds using Detour (Recast library) 更多...

#include <CrowdManager.h>

详细描述

Crowd manager is responsible for handling crowds using Detour (Recast library)

Agents will respect navmesh for all steering and avoidance updates, but it's slower than AvoidanceManager solution (RVO, cares only about agents)

All agents will operate on the same navmesh data, which will be picked from navigation system defaults (UNavigationSystemV1::SupportedAgents[0])

To use it, you have to add CrowdFollowingComponent to your agent (usually: replace class of PathFollowingComponent in AIController by adding those lines in controller's constructor

ACrowdAIController::ACrowdAIController(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer.SetDefaultSubobjectClass<UCrowdFollowingComponent>(TEXT("PathFollowingComponent")))

or simply add both components and switch move requests between them)

Actors that should be avoided, but are not being simulated by crowd (like players) should implement CrowdAgentInterface AND register/unregister themselves with crowd manager:

UCrowdManager* CrowdManager = UCrowdManager::GetCurrent(this); if (CrowdManager) { CrowdManager->RegisterAgent(this); }

Check flags in CrowdDebugDrawing namespace (CrowdManager.cpp) for debugging options.


该结构体的文档由以下文件生成: