RealDocs

AAIController::SetMoveBlockDetection

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

Description

Enables or disables movement block detection on the PathFollowingComponent. When enabled, the component monitors whether the pawn is making progress and fires a stuck event if it stops moving.

Caveats & Gotchas

  • Block detection is handled entirely by UPathFollowingComponent. This function simply forwards to it — if PathFollowingComponent is null, the call is silently ignored.
  • Disabling block detection means stuck pawns will never be notified. Only disable it if you have your own stuck-detection logic, otherwise AIs can freeze indefinitely against geometry.

Signature

void SetMoveBlockDetection(bool bEnable)

Parameters

Name Type Description Default
bEnable bool True to enable block detection, false to disable it.

Return Type

void

Example

Disable block detection during a cinematic move C++
// Temporarily disable stuck detection during a scripted sequence
SetMoveBlockDetection(false);
MoveToLocation(CinematicDestination, 50.f);

// Re-enable after the sequence is done via the move completed callback

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.