FRootMotionSourceGroup

Group of Root Motion Sources that are applied

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/GameFramework/RootMotionSource.h

Include

#include "GameFramework/RootMotionSource.h"

Syntax

struct FRootMotionSourceGroup

Remarks

Group of Root Motion Sources that are applied

Variables

Name Description

Public variable

uint8: 1

 

bHasAdditiveSources

Whether this group has additive root motion sources

Public variable

uint8: 1

 

bHasOverrideSources

Whether this group has override root motion sources

Public variable

uint8: 1

 

bHasOverrideSourcesWithIgnoreZAccumulate

Whether this group has override root motion sources that have IgnoreZAccumulate flag

Public variable

uint8: 1

 

bIsAdditiveVelocityApplied

True when we had additive velocity applied last tick, checked to know if we should restore LastPreAdditiveVelocity before a Velocity computation

Public variable

FRootMotionSour...

 

LastAccumulatedSettings

Aggregate Settings of the last group of accumulated sources

Public variable

FVector_NetQuan...

 

LastPreAdditiveVelocity

Saved off pre-additive-applied Velocity, used for being able to reliably add/remove additive velocity from currently computed Velocity (otherwise we would be removing additive velocity that no longer exists, like if you run into a wall and your Velocity becomes 0 - subtracting the velocity that we added heading into the wall last tick would make you go backwards. With this method we override that resulting Velocity due to obstructions

Public variable

TArray< TShared...

 

PendingAddRootMotionSources

Root Motion Sources to be added next frame

Public variable

TArray< TShared...

 

RootMotionSources

Root Motion Sources currently applied in this Group

Constructors

Name Description

Public function

FRootMotionSourceGroup()

Destructors

Name Description

Public function Virtual

~FRootMotionSourceGroup()

Functions

Name Description

Public function Const

void

 

AccumulateAdditiveRootMotionVelocity

(
    float DeltaTime,
    const ACharacter& Character,
    const UCharacterMovementComponent&...,
    FVector& InOutVelocity
)

Helper function for accumulating additive velocity into InOutVelocity

Public function Const

void

 

AccumulateOverrideRootMotionVelocity

(
    float DeltaTime,
    const ACharacter& Character,
    const UCharacterMovementComponent&...,
    FVector& InOutVelocity
)

Helper function for accumulating override velocity into InOutVelocity

Protected function Const

void

 

AccumulateRootMotionVelocity

(
    ERootMotionAccumulateMode RootMotio...,
    float DeltaTime,
    const ACharacter& Character,
    const UCharacterMovementComponent&...,
    FVector& InOutVelocity
)

Accumulates contributions for velocity into InOutVelocity for a given type of root motion from this group

Protected function Const

void

 

AccumulateRootMotionVelocityFromSource

(
    const FRootMotionSource& RootMotio...,
    float DeltaTime,
    const ACharacter& Character,
    const UCharacterMovementComponent&...,
    FVector& InOutVelocity
)

Accumulates contributions for velocity into InOutVelocity for a given type of root motion from this group

Public function

void

 

AddStructReferencedObjects

(
    FReferenceCollector& Collector
)

Exposes references to GC system

Public function

uint16

 

ApplyRootMotionSource

(
    TSharedPtr< FRootMotionSource > Sou...
)

Apply a RootMotionSource to this Group

Public function

void

 

ApplyTimeStampReset

(
    float DeltaTime
)

Applies a reset to the start time for each root motion when the time stamp is reset

Public function

void

 

CleanUpInvalidRootMotion

(
    float DeltaTime,
    const ACharacter& Character,
    UCharacterMovementComponent& MoveC...
)

Public function

void

 

Clear()

Clear the contents to return it to "empty"

Public function

void

 

CullInvalidSources()

Removes any Sources without a valid ID

Public function Const

bool

 

GetOverrideRootMotionRotation

(
    float DeltaTime,
    const ACharacter& Character,
    const UCharacterMovementComponent&...,
    FQuat& OutRotation
)

Get rotation output of current override root motion source, returns true if OutRotation was filled

Public function

TSharedPtr< ...

 

GetRootMotionSource

(
    FName InstanceName
)

Get a RootMotionSource from this Group by name

Public function

TSharedPtr< ...

 

GetRootMotionSourceByID

(
    uint16 RootMotionSourceID
)

Get a RootMotionSource from this Group by ID

Public function Const

bool

 

HasActiveRootMotionSources()

Public function Const

bool

 

HasAdditiveVelocity()

Public function Const

bool

 

HasOverrideVelocity()

Public function Const

bool

 

HasOverrideVelocityWithIgnoreZAccumulate()

Public function Const

bool

 

HasRootMotionToApply()

Public function Const

bool

 

HasVelocity()

Public function Const

bool

 

NeedsSimulatedSmoothing()

Gets whether any active root motion source has been marked to need NetworkSmoothing as a SimulatedProxy

Public function

bool

 

NetSerialize

(
    FArchive& Ar,
    UPackageMap* Map,
    bool& bOutSuccess
)

Serialize the root motion sources and their states for this group

Protected function Static

void

 

NetSerializeRMSArray

(
    FArchive& Ar,
    UPackageMap* Map,
    bool& bOutSuccess,
    TArray< TSharedPtr< FRootMotionSour...
)

Helper function for serializing array of root motion sources

Public function

void

 

PrepareRootMotion

(
    float DeltaTime,
    const ACharacter& Character,
    const UCharacterMovementComponent&...,
    bool bForcePrepareAll
)

Generates root motion by accumulating transforms through current root motion sources.

Public function

void

 

RemoveRootMotionSource

(
    FName InstanceName
)

Remove a RootMotionSource from this Group by name

Public function

void

 

RemoveRootMotionSourceByID

(
    uint16 RootMotionSourceID
)

Remove a RootMotionSource from this Group by ID

Public function

void

 

SetPendingRootMotionSourceMinStartTimes

(
    float NewStartTime
)

Sets the StartTime of all pending root motion sources to be at least this time, can be used on servers to match client-side start times

Public function

void

 

UpdateStateFrom

(
    const FRootMotionSourceGroup& Grou...,
    bool bMarkForSimulatedCatchup
)

Update contained Sources to state in matching sources from other group.

Operators

Name Description

Public function Const

bool

 

operator!=

(
    const FRootMotionSourceGroup& Othe...
)

Comparison operator

Public function

FRootMotionS...

 

operator=

(
    const FRootMotionSourceGroup& Othe...
)

Copy operator - deep copy so it can be used for archiving/saving off moves

Public function Const

bool

 

operator==

(
    const FRootMotionSourceGroup& Othe...
)

Comparison operator - needs matching Sources along with identical states in those sources

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