UAIBlueprintHelperLibrary::SimpleMoveToActor
#include "Blueprint/AIBlueprintHelperLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintCallable
Description
Instructs a controller's pawn to move toward an actor using the navigation system. The pawn will attempt to reach the actor's location at the time of the call; the path is not continuously updated.
Signature
static AIMODULE_API void SimpleMoveToActor(AController* Controller, const AActor* Goal) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| Controller | AController* | The controller whose pawn will be moved. | — |
| Goal | const AActor* | The actor to move toward. | — |
Return Type
void Caveats & Gotchas
- • The path is computed once and not re-evaluated as the goal actor moves. For chasing behaviour, use UAITask_MoveTo or override UpdateMove in a custom MovementComponent.
- • Requires a NavMesh beneath the goal actor's location. If unreachable, the pawn silently stops.
Example
Chase a player character C++
void AMyAIController::ChasePlayer(ACharacter* Player)
{
UAIBlueprintHelperLibrary::SimpleMoveToActor(this, Player);
} Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?