UAITask_MoveTo

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

AIModule

Header

/Engine/Source/Runtime/AIModule/Classes/Tasks/AITask_MoveTo.h

Include

#include "Tasks/AITask_MoveTo.h"

Syntax

class UAITask_MoveTo : public UAITask

Variables

Name Description

Protected variable

uint8 : 1

 

bUseContinuousTracking

Protected variable

FAIMoveRequest

 

MoveRequest

Parameters of move request

Protected variable

FAIRequestID

 

MoveRequestID

Request ID of path following's request

Protected variable

TEnumAsByte < EP ...

 

MoveResult

Protected variable

FTimerHandle

 

MoveRetryTimerHandle

Handle of active ConditionalPerformMove timer

Protected variable

FMoveTaskComple ...

 

OnMoveFinished

Protected variable

FGenericGamepla ...

 

OnRequestFailed

Protected variable

FNavPathSharedP ...

 

Path

Currently followed path

Protected variable

FDelegateHandle

 

PathFinishDelegateHandle

Handle of path following's OnMoveFinished delegate

Protected variable

FTimerHandle

 

PathRetryTimerHandle

Handle of active ConditionalUpdatePath timer

Protected variable

FDelegateHandle

 

PathUpdateDelegateHandle

Handle of path's update event delegate

Constructors

Name Description

Public function

UAITask_MoveTo

(
    const FObjectInitializer & ObjectIn...
)

Functions

Name Description

Public function Static

UAITask_Move ...

 

AIMoveTo

(
    AAIController * Controller,
    FVector GoalLocation,
    AActor * GoalActor,
    float AcceptanceRadius,
    EAIOptionFlag::Type StopOnOverlap,
    EAIOptionFlag::Type AcceptPartialPa...,
    bool bUsePathfinding,
    bool bLockAILogic,
    bool bUseContinuosGoalTracking,
    EAIOptionFlag::Type ProjectGoalOnNa...
)

Public function

void

 

ConditionalPerformMove()

Tries to start move request and handles retry timer

Protected function

void

 

ConditionalUpdatePath()

Tries to update invalidated path and handles retry timer

Protected function

void

 

FinishMoveTask

(
    EPathFollowingResult::Type InResult
)

Finish task

Public function

FAIMoveReque ...

 

GetMoveRequestRef()

Allows custom move request tweaking.

Public function Const

EPathFollowi ...

 

GetMoveResult()

Protected function Virtual

void

 

OnPathEvent

(
    FNavigationPath * InPath,
    ENavPathEvent::Type Event
)

Event from followed path

Protected function Virtual

void

 

OnRequestFinished

(
    FAIRequestID RequestID,
    const FPathFollowingResult & Result
)

Event from path following

Protected function Virtual

void

 

PerformMove()

Start move request

Protected function Virtual

void

 

ResetObservers()

Remove all delegates

Protected function Virtual

void

 

ResetTimers()

Remove all timers

Public function

void

 

SetContinuousGoalTracking

(
    bool bEnable
)

Switch task into continuous tracking mode: keep restarting move toward goal actor.

Protected function

void

 

SetObservedPath

(
    FNavPathSharedPtr InPath
)

Stores path and starts observing its events

Public function

void

 

SetUp

(
    AAIController * Controller,
    const FAIMoveRequest & InMoveReques...
)

Prepare move task for activation

Public function Const

bool

 

WasMovePartial()

Public function Const

bool

 

WasMoveSuccessful()

Overridden from UGameplayTask

Name Description

Protected function Virtual

void

 

Activate()

Called to trigger the actual task once the delegates have been set up Note that the default implementation does nothing and you don't have to call it

Protected function Virtual

void

 

OnDestroy

(
    bool bInOwnerFinished
)

End and CleanUp the task - may be called by the task itself or by the task owner if the owner is ending.

Protected function Virtual

void

 

Pause()

Protected by design. Not meant to be called outside from GameplayTaskComponent mechanics

Protected function Virtual

void

 

Resume()

Deprecated Functions

Name Description

Public function

void

 

SetUp

(
    AAIController * Controller,
    FVector GoalLocation,
    AActor * GoalActor,
    float AcceptanceRadius,
    bool bUsePathfinding,
    EAIOptionFlag::Type StopOnOverlap,
    EAIOptionFlag::Type AcceptPartialPa...
)

This function is now depreacted, please use version with FAIMoveRequest parameter

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback