| FRootMotionSource::PrepareRootMotion()
|
Module |
|
Header |
/Engine/Source/Runtime/Engine/Classes/GameFramework/RootMotionSource.h |
Include |
#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
)
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