Struct RootMotionSource
Generalized source of Root Motion to a CharacterMovementComponent.
Inherited Members
Namespace: UE4.Engine
Assembly: UE4DotNet.dll
Syntax
public struct RootMotionSource
Remarks
Has priorities and different accumulation modes (override, additive, set, ignore).
RootMotionSources are accumulated from highest priority to lowest, once all values are "finalized" (meaning no more accumulation to those values), root motion accumulation is finished. Having all of translation and rotation in a transform being overridden during root motion accumulation means that CharacterMovementComponent Phys*() functions no longer need to CalcVelocity() since it'll just get overridden anyway.
Some example source possibilities: Full Animation Root Motion (matching only form of root motion we've supported historically): - Overrides all translation axes or rotation or both - Very High priority so it gets applied first and since it is override no other RootMotionSources have an influence that are lower priority - Scale on translation and/or rotation is set to 1 to match animation 1 for 1 - Provides local space transform (character-orientation relative)
- End result: Same as before - overrides velocity/rotation to values in AnimMontage
- But can now scale individual translation axes if desired, or instead of override
can use "set" to allow other additive sources of root motion to be applied on top
of the animation root motion (modify velocity to home root motion melee attacks, etc.)
Jump pad volumes that work during animation root montage attacks
- Constant velocity modification Z up, additive and high priority
- Attack/melee animation root motion uses "set" instead of "override" to allow other sources
- Animation root motion is applied, then the Z up additive of this source is so you are
affected by the jump pad
Attack/melee homing
- Additive, lower priority so it gets applied after any animation/significant root motion
- World space, sourced by logic modifying velocity to go towards nearby enemies
- Could point to a UAbilityTask node from the GameplayAbilities system
Character movement controlled by splines/curves in-editor instead of requiring animation tweaks
- Same as animation root motion but source from spline/curve data
Fields
| Improve this Doc View SourcebInLocalSpace
Declaration
public bool bInLocalSpace
Field Value
Type | Description |
---|---|
System.Boolean |
CurrentTime
Declaration
public float CurrentTime
Field Value
Type | Description |
---|---|
System.Single |
Duration
Declaration
public float Duration
Field Value
Type | Description |
---|---|
System.Single |
InstanceName
Declaration
public Name InstanceName
Field Value
Type | Description |
---|---|
Name |
PreviousTime
Declaration
public float PreviousTime
Field Value
Type | Description |
---|---|
System.Single |
StartTime
Declaration
public float StartTime
Field Value
Type | Description |
---|---|
System.Single |