UBTTask_MoveTo

Move To task node.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

AIModule

Header

/Engine/Source/Runtime/AIModule/Classes/BehaviorTree/Tasks/BTTask_MoveTo.h

Include

#include "BehaviorTree/Tasks/BTTask_MoveTo.h"

Syntax

class UBTTask_MoveTo : public UBTTask_BlackboardBase

Remarks

Move To task node. Moves the AI pawn toward the specified Actor or Location blackboard entry using the navigation system.

Variables

Name Description

Public variable

float

 

AcceptableRadius

Fixed distance added to threshold between AI and goal location in destination reach test

Public variable

uint32: 1

 

bAllowPartialPath

If set, use incomplete path when goal can't be reached

Public variable

uint32: 1

 

bAllowStrafe

Public variable

uint32: 1

 

bObserveBlackboardValue

If move goal in BB changes the move will be redirected to new location

Public variable

uint32: 1

 

bProjectGoalLocation

If set, goal location will be projected on navigation data (navmesh) before using

Public variable

uint32: 1

 

bReachTestIncludesAgentRadius

If set, radius of AI's capsule will be added to threshold between AI and goal location in destination reach test

Public variable

uint32: 1

 

bReachTestIncludesGoalRadius

If set, radius of goal's capsule will be added to threshold between AI and goal location in destination reach test

Public variable

uint32: 1

 

bStopOnOverlap

DEPRECATED, please use combination of bReachTestIncludes*Radius instead

Public variable

uint32: 1

 

bStopOnOverlapNeedsUpdate

Public variable

uint32: 1

 

bTrackMovingGoal

If set, path to goal actor will update itself when actor moves

Public variable

uint32: 1

 

bUseGameplayTasks

Set automatically if move should use GameplayTasks

Public variable

uint32: 1

 

bUsePathfinding

If set, move will use pathfinding. Not exposed on purpose, please use BTTask_MoveDirectlyToward

Public variable

TSubclassOf< UN...

 

FilterClass

"None" will result in default filter being used

Public variable

float

 

ObservedBlackboardValueTolerance

If task is expected to react to changes to location represented by BB key this property can be used to tweak sensitivity of the mechanism.

Constructors

Name Description

Public function

UBTTask_MoveTo

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function

EBlackboardN...

 

OnBlackboardValueChange

(
    const UBlackboardComponent& Blackb...,
    FBlackboard::FKey ChangedKeyID
)

Protected function

EBTNodeResul...

 

PerformMoveTask

(
    UBehaviorTreeComponent& OwnerComp,
    uint8* NodeMemory
)

Protected function Virtual

UAITask_Move...

 

PrepareMoveTask

(
    UBehaviorTreeComponent& OwnerComp,
    UAITask_MoveTo* ExistingTask,
    FAIMoveRequest& MoveRequest
)

Prepares move task for activation

Overridden from UBTTaskNode

Name Description

Public function Virtual

EBTNodeResul...

 

AbortTask

(
    UBehaviorTreeComponent& OwnerComp,
    uint8* NodeMemory
)

Aborts this task, should return Aborted or InProgress (use FinishLatentAbort() when returning InProgress) this function should be considered as const (don't modify state of object) if node is not instanced!

Public function Virtual

EBTNodeResul...

 

ExecuteTask

(
    UBehaviorTreeComponent& OwnerComp,
    uint8* NodeMemory
)

Starts this task, should return Succeeded, Failed or InProgress (use FinishLatentTask() when returning InProgress) this function should be considered as const (don't modify state of object) if node is not instanced!

Public function Virtual

void

 

OnMessage

(
    UBehaviorTreeComponent& OwnerComp,
    uint8* NodeMemory,
    FName Message,
    int32 RequestID,
    bool bSuccess
)

Message handler, default implementation will finish latent execution/abortion this function should be considered as const (don't modify state of object) if node is not instanced!

Public function Virtual

void

 

OnTaskFinished

(
    UBehaviorTreeComponent& OwnerComp,
    uint8* NodeMemory,
    EBTNodeResult::Type TaskResult
)

Called when task execution is finished this function should be considered as const (don't modify state of object) if node is not instanced!

Public function Virtual

void

 

TickTask

(
    UBehaviorTreeComponent& OwnerComp,
    uint8* NodeMemory,
    float DeltaSeconds
)

Ticks this task this function should be considered as const (don't modify state of object) if node is not instanced!

Overridden from UBTNode

Name Description

Public function Virtual Const

void

 

DescribeRuntimeValues

(
    const UBehaviorTreeComponent& Owne...,
    uint8* NodeMemory,
    EBTDescriptionVerbosity::Type Verbo...,
    TArray< FString >& Values
)

Gathers description of all runtime parameters

Public function Virtual Const

uint16

 

GetInstanceMemorySize()

Size of instance memory

Public function Virtual Const

FName

 

GetNodeIconName()

Get the name of the icon used to display this node in the editor

Public function Virtual Const

FString

 

GetStaticDescription()

Public function Virtual

void

 

OnNodeCreated()

Called after creating new node in behavior tree editor, use for versioning

Overridden from UObject

Name Description

Public function Virtual

void

 

PostLoad()

Do any object-specific cleanup required immediately after loading an object.

Overridden from IGameplayTaskOwnerInterface

Name Description

Public function Virtual

void

 

OnGameplayTaskDeactivated

(
    UGameplayTask& Task
)

Notify called after GameplayTask changes state from Active (finishing or pausing)

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