RealDocs

AAIController::GetPathFollowingComponent

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

Description

Returns the PathFollowingComponent subobject responsible for executing movement along a nav path. Use this to access fine-grained path following state or configure movement tolerances directly.

Caveats & Gotchas

  • The PathFollowingComponent is private — this getter is the only way to access it. Do not store the returned pointer across frames without checking for validity, especially after controller re-possession.
  • Can return nullptr on controllers that were constructed without a PathFollowingComponent (e.g., custom lightweight AI controllers).

Signature

UPathFollowingComponent* GetPathFollowingComponent() const

Return Type

UPathFollowingComponent*

Example

Access the component to check path following state C++
UPathFollowingComponent* PFC = GetPathFollowingComponent();
if (PFC && PFC->HasReached(*GetPawn(), FAITargetSelection::Default))
{
	// Pawn is at the target
}

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.