Navigation
API > API/Plugins > API/Plugins/AnimationLocomotionLibraryRuntim- > API/Plugins/AnimationLocomotionLibraryRuntim-/UAnimDistanceMatchingLibrary
Description
Advance the sequence evaluator forward by distance traveled rather than time. A distance curve is required on the animation that describes the distance traveled by the root bone in the animation. See UDistanceCurveModifier.
| Name | AdvanceTimeByDistanceMatching |
| Type | function |
| Header File | /Engine/Plugins/Animation/AnimationLocomotionLibrary/Source/Runtime/Public/AnimDistanceMatchingLibrary.h |
| Include Path | #include "AnimDistanceMatchingLibrary.h" |
| Source | /Engine/Plugins/Animation/AnimationLocomotionLibrary/Source/Runtime/Private/AnimDistanceMatchingLibrary.cpp |
UFUNCTION (BlueprintCallable, Category="Distance Matching", Meta=(BlueprintThreadSafe))
static FSequenceEvaluatorReference AdvanceTimeByDistanceMatching
(
const FAnimUpdateContext & UpdateContext,
const FSequenceEvaluatorReference & SequenceEvaluator,
float DistanceTraveled,
FName DistanceCurveName,
FVector2D PlayRateClamp
)
Parameters
| Name | Remarks |
|---|---|
| UpdateContext | The update context provided in the anim node function. |
| SequenceEvaluator | The sequence evaluator node to operate on. |
| DistanceTraveled | The distance traveled by the character since the last animation update. |
| DistanceCurveName | Name of the curve we want to match |
| PlayRateClamp | A clamp on the effective play rate of the animation after distance matching. Set to (0,0) for no clamping. |