RealDocs

AAIController::GetPathFollowingAgent

function AIModule Since 4.0
#include "AIController.h"
Access: public Specifiers: virtualoverride

Description

Returns a pointer to the IPathFollowingAgentInterface implementation — in practice, the PathFollowingComponent cast to that interface. Used by the navigation system to query movement capabilities.

Caveats & Gotchas

  • This is an INavAgentInterface override. External callers (navigation system, BT tasks) use this to retrieve the path following agent without casting to AAIController — do not bypass it by casting directly.
  • Returns nullptr if no PathFollowingComponent exists. This can happen on lightweight AI controllers that intentionally skip path following.

Signature

virtual IPathFollowingAgentInterface* GetPathFollowingAgent() const override

Return Type

IPathFollowingAgentInterface*

Example

Retrieve the path following agent for direct queries C++
IPathFollowingAgentInterface* Agent = MyAIController->GetPathFollowingAgent();
if (Agent)
{
	// Query the agent for current following state
}

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.