AAIController::HasPartialPath
#include "AIController.h"
Access: public
Specifiers: UFUNCTIONBlueprintCallable
Description
Returns true if the PathFollowingComponent is currently following a partial path — one that does not reach the actual goal because the destination is unreachable.
Caveats & Gotchas
- • A partial path is only generated when bAllowPartialPath is true on the move request. If you did not set that flag and the goal is unreachable, the move fails immediately and HasPartialPath returns false.
- • This returns false when no move is active, not just when the path is complete. Check GetMoveStatus first to know whether the AI is actually moving.
Signature
bool HasPartialPath() const Return Type
bool Example
Detect when the AI cannot fully reach its target C++
void AMyAIController::OnMoveCompleted(FAIRequestID RequestID, const FPathFollowingResult& Result)
{
Super::OnMoveCompleted(RequestID, Result);
if (HasPartialPath())
{
// Destination was unreachable; handle gracefully
ChooseFallbackBehavior();
}
} See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?