Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/FRootMotionSource_MoveToForce
Description
Generates the RootMotion for this Source, can be used for both "live" generation or for playback (client prediction correction, simulated proxies, etc.)
Examples:
- Animation RootMotionSources use Time as track time into AnimMontage and extract the root motion from AnimMontage chunk of time (Position,Position+DeltaTime)
- ConstantForce source uses Time as the time into the application so if its duration ends halfway through the frame it knows how much root motion it should have applied
- Spline/curve-based sources use Time for knowing where on spline/curve to extract from
Virtual Inheritance
- FRootMotionSource::PrepareRootMotion → FRootMotionSource_MoveToForce::PrepareRootMotion
| Name | PrepareRootMotion |
| Type | function |
| Header File | /Engine/Source/Runtime/Engine/Classes/GameFramework/RootMotionSource.h |
| Include Path | #include "GameFramework/RootMotionSource.h" |
| Source | /Engine/Source/Runtime/Engine/Private/GameFramework/RootMotionSource.cpp |
virtual void PrepareRootMotion
(
float SimulationTime,
float MovementTickTime,
const ACharacter & Character,
const UCharacterMovementComponent & MoveComponent
)