Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/GameFramework
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
| Type | Name | Description | |
|---|---|---|---|
| uint8: 1 | bHasAdditiveSources | Whether this group has additive root motion sources | |
| uint8: 1 | bHasOverrideSources | Whether this group has override root motion sources | |
| uint8: 1 | bHasOverrideSourcesWithIgnoreZAccumulate | Whether this group has override root motion sources that have IgnoreZAccumulate flag | |
| uint8: 1 | bIsAdditiveVelocityApplied | True when we had additive velocity applied last tick, checked to know if we should restore LastPreAdditiveVelocity before a Velocity computation | |
| FRootMotionSourceSettings | LastAccumulatedSettings | Aggregate Settings of the last group of accumulated sources | |
| FVector_NetQuantize10 | 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 | |
| TArray< TSharedPtr< FRootMotionSource > > | PendingAddRootMotionSources | Root Motion Sources to be added next frame | |
| TArray< TSharedPtr< FRootMotionSource > > | RootMotionSources | Root Motion Sources currently applied in this Group |
Constructors
| Type | Name | Description | |
|---|---|---|---|
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AccumulateAdditiveRootMotionVelocity
(
float DeltaTime, |
Helper function for accumulating additive velocity into InOutVelocity | |
| void | AccumulateOverrideRootMotionVelocity
(
float DeltaTime, |
Helper function for accumulating override velocity into InOutVelocity | |
| void | AccumulateRootMotionVelocity
(
ERootMotionAccumulateMode RootMotionType, |
Accumulates contributions for velocity into InOutVelocity for a given type of root motion from this group | |
| void | AccumulateRootMotionVelocityFromSource
(
const FRootMotionSource& RootMotionSource, |
Accumulates contributions for velocity into InOutVelocity for a given type of root motion from this group | |
| void | AddStructReferencedObjects
(
FReferenceCollector& Collector |
Exposes references to GC system | |
| uint16 | ApplyRootMotionSource
(
TSharedPtr< FRootMotionSource > SourcePtr |
Apply a RootMotionSource to this Group | |
| void | ApplyTimeStampReset
(
float DeltaTime |
Applies a reset to the start time for each root motion when the time stamp is reset | |
| void | CleanUpInvalidRootMotion
(
float DeltaTime, |
||
| void | Clear () |
Clear the contents to return it to "empty" | |
| void | Removes any Sources without a valid ID | ||
| bool | GetOverrideRootMotionRotation
(
float DeltaTime, |
Get rotation output of current override root motion source, returns true if OutRotation was filled | |
| TSharedPtr< FRootMotionSource > | GetRootMotionSource
(
FName InstanceName |
Get a RootMotionSource from this Group by name | |
| TSharedPtr< FRootMotionSource > | GetRootMotionSourceByID
(
uint16 RootMotionSourceID |
Get a RootMotionSource from this Group by ID | |
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | HasVelocity () |
||
| bool | Gets whether any active root motion source has been marked to need NetworkSmoothing as a SimulatedProxy | ||
| bool | NetSerialize
(
FArchive& Ar, |
Serialize the root motion sources and their states for this group | |
| void | NetSerializeRMSArray
(
FArchive& Ar, |
Helper function for serializing array of root motion sources | |
| void | PrepareRootMotion
(
float DeltaTime, |
Generates root motion by accumulating transforms through current root motion sources. | |
| void | RemoveRootMotionSource
(
FName InstanceName |
Remove a RootMotionSource from this Group by name | |
| void | RemoveRootMotionSourceByID
(
uint16 RootMotionSourceID |
Remove a RootMotionSource from this Group by ID | |
| 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 | |
| void | UpdateStateFrom
(
const FRootMotionSourceGroup& GroupToTakeStateFrom, |
Update contained Sources to state in matching sources from other group. |
Operators
| Type | Name | Description | |
|---|---|---|---|
| bool | operator!=
(
const FRootMotionSourceGroup& Other |
Comparison operator | |
| FRootMotionSourceGroup & | operator=
(
const FRootMotionSourceGroup& Other |
Copy operator - deep copy so it can be used for archiving/saving off moves | |
| bool | operator==
(
const FRootMotionSourceGroup& Other |
Comparison operator - needs matching Sources along with identical states in those sources |