AAIController::GetImmediateMoveDestination
#include "AIController.h"
Access: public
Specifiers: UFUNCTIONBlueprintCallable
Description
Returns the world-space position of the end point of the current path segment being followed. This is the next intermediate waypoint, not the final destination.
Caveats & Gotchas
- • Returns FAISystem::InvalidLocation (a sentinel FVector with very large values) when no move is active. Always check GetMoveStatus before using this value in calculations.
- • The value changes each time the PathFollowingComponent advances to the next path segment. Do not cache it across frames without re-querying.
Signature
FVector GetImmediateMoveDestination() const Return Type
FVector Example
Draw a debug line toward the immediate waypoint C++
void AMyAIController::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
if (GetMoveStatus() == EPathFollowingStatus::Moving)
{
FVector WP = GetImmediateMoveDestination();
DrawDebugSphere(GetWorld(), WP, 20.f, 8, FColor::Yellow, false, -1.f, 0, 2.f);
}
} Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?