AAIController::MoveToActor

Makes AI go toward specified Goal actor (destination will be continuously updated), aborts any active path following

Windows
MacOS
Linux

References

Module

AIModule

Header

/Engine/Source/Runtime/AIModule/Classes/AIController.h

Include

#include "AIController.h"

Source

/Engine/Source/Runtime/AIModule/Private/AIController.cpp

Syntax

EPathFollowingRequestResult::Type MoveToActor
(
    AActor * Goal,
    float AcceptanceRadius,
    bool bStopOnOverlap,
    bool bUsePathfinding,
    bool bCanStrafe,
    TSubclassOf< UNavigationQueryFilter > FilterClass,
    bool bAllowPartialPath
)

Remarks

Makes AI go toward specified Goal actor (destination will be continuously updated), aborts any active path following

Parameters

Parameter

Description

AcceptanceRadius

finish move if pawn gets close enough

bStopOnOverlap

add pawn's radius to AcceptanceRadius

bUsePathfinding

use navigation data to calculate path (otherwise it will go in straight line)

bCanStrafe

set focus related flag: bAllowStrafe

FilterClass

navigation filter for pathfinding adjustments. If none specified DefaultNavigationFilterClass will be used

bAllowPartialPath

use incomplete path when goal can't be reached @note AcceptanceRadius has default value or -1 due to Header Parser not being able to recognize UPathFollowingComponent::DefaultAcceptanceRadius

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss