UAbilityTask_MoveToLocation

TODO: -Implement replicated time so that this can work as a simulated task for Join In Progress clients.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

GameplayAbilities

Header

/Engine/Plugins/Runtime/GameplayAbilities/Source/GameplayAbilities/Public/Abilities/Tasks/AbilityTask_MoveToLocation.h

Include

#include "Abilities/Tasks/AbilityTask_MoveToLocation.h"

Syntax

[UCLASS](Programming/UnrealArchitecture/Reference/Classes#classdeclaration)()
class UAbilityTask_MoveToLocation : public UAbilityTask

Remarks

TODO: -Implement replicated time so that this can work as a simulated task for Join In Progress clients. Move to a location, ignoring clipping, over a given length of time. Ends when the TargetLocation is reached. This will RESET your character's current movement mode! If you wish to maintain PHYS_Flying or PHYS_Custom, you must reset it on completion.!

Variables

Name Description

Protected variable

bool

 

bIsFinished

Protected variable UProperty Replicated

float

 

DurationOfMovement

Protected variable UProperty Replicated

UCurveFloat ...

 

LerpCurve

Protected variable UProperty Replicated

UCurveVector &#...

 

LerpCurveVector

Public variable UProperty BlueprintAssignable

FMoveToLocation...

 

OnTargetLocationReached

Protected variable UProperty Replicated

FVector

 

StartLocation

Protected variable UProperty Replicated

FVector

 

TargetLocation

Protected variable

float

 

TimeMoveStarted

Protected variable

float

 

TimeMoveWillEnd

Constructors

Name Description

Public function

UAbilityTask_MoveToLocation

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function Static UFunction BlueprintCallable, Category, Meta

UAbilityTask...

 

MoveToLocation

(
    UGameplayAbility* OwningAbilit...,
    FName TaskInstanceName,
    FVector Location,
    float Duration,
    UCurveFloat* OptionalInterpola...,
    UCurveVector* OptionalVectorIn...
)

Move to the specified location, using the vector curve (range 0 - 1) if specified, otherwise the float curve (range 0 - 1) or fallback to linear interpolation

Overridden from UGameplayTask

Name Description

Public 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

Public function Virtual

void

 

InitSimulatedTask

(
    UGameplayTasksComponent& InGamepla...
)

Public 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.

Public function Virtual

void

 

TickTask

(
    float DeltaTime
)

Tick function for this task, if bTickingTask == true

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