Language:
Discover
By Skill Level
By Category

AAIController::MoveToLocation

Choose your OS:

Syntax

EPathFollowingRequestResult::Type MoveToLocation
(
    const FVector & Dest,
    float AcceptanceRadius,
    bool bStopOnOverlap,
    bool bUsePathfinding,
    bool bProjectDestinationToNavigation,
    bool bCanStrafe,
    TSubclassOf < UNavigationQueryFilter > FilterClass,
    bool bAllowPartialPath
)

Remarks

Makes AI go toward specified Dest location, aborts any active path following

AcceptanceRadius has default value or -1 due to Header Parser not being able to recognize UPathFollowingComponent::DefaultAcceptanceRadius

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)

bProjectDestinationToNavigation

project location on navigation data before using it

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

References

Module

AIModule

Header

Runtime/AIModule/Classes/AIController.h

Source

Runtime/AIModule/Private/AIController.cpp