AAIController::K2_SetFocalPoint
#include "AIController.h"
Access: public
Specifiers: UFUNCTIONBlueprintCallable
Description
Sets the controller's focus to a fixed world-space position rather than a tracked actor. Exposed to Blueprint as 'SetFocalPoint'.
Caveats & Gotchas
- • This sets focus at EAIFocusPriority::Gameplay. If a Behavior Tree task is simultaneously running a 'Set Focus' node at the same priority, the task will overwrite this call on its next tick.
- • Unlike K2_SetFocus (which tracks a moving actor), K2_SetFocalPoint stores a static position. Use K2_SetFocus instead when the intended target is a moving actor so the focal point updates each frame.
Signature
void K2_SetFocalPoint(FVector FP) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| FP | FVector | World-space position to focus on. | — |
Return Type
void Example
Lock AI gaze on a fixed world point C++
// In a custom BTTask or AIController method:
FVector TargetLocation = PatrolPoint->GetActorLocation();
AIController->K2_SetFocalPoint(TargetLocation); Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?