FRootMotionSource::PrepareRootMotion

Generates the RootMotion for this Source, can be used for both "live" generation or for playback (client prediction correction, simulated proxies, etc.)

Windows
MacOS
Linux

Override Hierarchy

References

Module

Engine

Header

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

Include

#include "GameFramework/RootMotionSource.h"

Source

/Engine/Source/Runtime/Engine/Private/GameFramework/RootMotionSource.cpp

Syntax

virtual void PrepareRootMotion
(
    float SimulationTime,
    float MovementTickTime,
    const ACharacter & Character,
    const UCharacterMovementComponent & MoveComponent
)

Remarks

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

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