UAbilityTask_ApplyRootMotionMoveToActorForce

Applies force to character's movement

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

GameplayAbilities

Header

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

Include

#include "Abilities/Tasks/AbilityTask_ApplyRootMotionMoveToActorForce.h"

Syntax

[UCLASS](Programming/UnrealArchitecture/Reference/Classes#classdeclaration)()
class UAbilityTask_ApplyRootMotionMoveToActorForce : public UAbilityTask_ApplyRootMotion_Base

Remarks

Applies force to character's movement

Variables

Name Description

Protected variable UProperty Replicated

bool

 

bDisableDestinationReachedInterrupt

By default, this force ends when the destination is reached.

Protected variable UProperty Replicated

bool

 

bRestrictSpeedToExpected

If enabled, we limit velocity to the initial expected velocity to go distance to the target over Duration.

Protected variable UProperty Replicated

bool

 

bSetNewMovementMode

Protected variable UProperty Replicated

float

 

Duration

Protected variable UProperty Replicated

TEnumAsByte< EM...

 

NewMovementMode

Protected variable UProperty Replicated

ERootMotionMove...

 

OffsetAlignment

Public variable UProperty BlueprintAssignable

FApplyRootMotio...

 

OnFinished

Protected variable UProperty Replicated

UCurveVector &#...

 

PathOffsetCurve

Protected variable

EMovementMode

 

PreviousMovementMode

Protected variable UProperty Replicated

FVector

 

StartLocation

Protected variable UProperty Replicated

AActor *

 

TargetActor

Protected variable

FDelegateHandle

 

TargetActorSwapHandle

Protected variable UProperty Replicated

UCurveFloat ...

 

TargetLerpSpeedHorizontalCurve

Protected variable UProperty Replicated

UCurveFloat ...

 

TargetLerpSpeedVerticalCurve

Protected variable UProperty replicatedusing

FVector

 

TargetLocation

Protected variable UProperty Replicated

FVector

 

TargetLocationOffset

Protected variable UProperty Replicated

UCurveFloat ...

 

TimeMappingCurve

Maps real time to movement fraction curve to affect the speed of the movement through the path Curve X is 0 to 1 normalized real time (a fraction of the duration) Curve Y is 0 to 1 is what percent of the move should be at a given X Default if unset is a 1:1 correspondence

Constructors

Name Description

Public function

UAbilityTask_ApplyRootMotionMoveToActorForce

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function Static UFunction BlueprintCallable, Category, Meta

UAbilityTask...

 

ApplyRootMotionMoveToActorForce

(
    UGameplayAbility* OwningAbilit...,
    FName TaskInstanceName,
    AActor* TargetActor,
    FVector TargetLocationOffset,
    ERootMotionMoveToActorTargetOffsetT...,
    float Duration,
    UCurveFloat* TargetLerpSpeedHo...,
    UCurveFloat* TargetLerpSpeedVe...,
    bool bSetNewMovementMode,
    EMovementMode MovementMode,
    bool bRestrictSpeedToExpected,
    UCurveVector* PathOffsetCurve,
    UCurveFloat* TimeMappingCurve,
    ERootMotionFinishVelocityMode Veloc...,
    FVector SetVelocityOnFinish,
    float ClampVelocityOnFinish,
    bool bDisableDestinationReachedInte...
)

Apply force to character's movement

Public function Static UFunction BlueprintCallable, Category, Meta

UAbilityTask...

 

ApplyRootMotionMoveToTargetDataActorForce

(
    UGameplayAbility* OwningAbilit...,
    FName TaskInstanceName,
    FGameplayAbilityTargetDataHandle Ta...,
    int32 TargetDataIndex,
    int32 TargetActorIndex,
    FVector TargetLocationOffset,
    ERootMotionMoveToActorTargetOffsetT...,
    float Duration,
    UCurveFloat* TargetLerpSpeedHo...,
    UCurveFloat* TargetLerpSpeedVe...,
    bool bSetNewMovementMode,
    EMovementMode MovementMode,
    bool bRestrictSpeedToExpected,
    UCurveVector* PathOffsetCurve,
    UCurveFloat* TimeMappingCurve,
    ERootMotionFinishVelocityMode Veloc...,
    FVector SetVelocityOnFinish,
    float ClampVelocityOnFinish,
    bool bDisableDestinationReachedInte...
)

Apply force to character's movement using an index into targetData instead of using an actor directly.

Protected function Const

FVector

 

CalculateTargetOffset()

Protected function UFunction

void

 

OnRep_TargetLocation()

Public function UFunction

void

 

OnTargetActorSwapped

(
    AActor* OriginalTarget,
    AActor* NewTarget
)

Protected function

void

 

SetRootMotionTargetLocation

(
    FVector NewTargetLocation
)

Protected function

bool

 

UpdateTargetLocation

(
    float DeltaTime
)

Overridden from UAbilityTask_ApplyRootMotion_Base

Name Description

Protected function Virtual

void

 

SharedInitAndApply()

Overridden from UGameplayTask

Name Description

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

Overridden from UObject

Name Description

Public function Virtual

void

 

PreDestroyFromReplication()

Called right before being marked for destruction due to network replication

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