UAnimDistanceMatchingLibrary

Library of techniques for driving animations by distance metrics rather than by time.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

AnimationLocomotionLibraryRuntime

Header

/Engine/Plugins/Animation/AnimationLocomotionLibrary/Source/Runtime/Public/AnimDistanceMatchingLibrary.h

Include

#include "AnimDistanceMatchingLibrary.h"

Syntax

UCLASS()
class UAnimDistanceMatchingLibrary : public UBlueprintFunctionLibrary

Remarks

Library of techniques for driving animations by distance metrics rather than by time. These techniques can be effective at compensating for differences between character movement and authored motion in the animations. Distance Matching effectively changes the play rate of the animation to keep the feet from sliding. It's common to clamp the resulting play rate to avoid animations playing too slow or too fast and to use techniques such as Stride Warping to make up the difference.

Functions

Name Description

Public function Static UFunction BlueprintCallable, Category, Meta

FSequenceEva...

 

AdvanceTimeByDistanceMatching

(
    const FAnimUpdateContext& UpdateCo...,
    const FSequenceEvaluatorReference&...,
    float DistanceTraveled,
    const FDistanceCurve& CachedDistan...,
    FVector2D PlayRateClamp
)

Advance the sequence evaluator forward by distance traveled rather than time.

Public function Static UFunction BlueprintCallable, Category, Meta

FSequenceEva...

 

DistanceMatchToTarget

(
    const FSequenceEvaluatorReference&...,
    float DistanceToTarget,
    const FDistanceCurve& CachedDistan...
)

Set the time of the sequence evaluator to the point in the animation where the distance curve matches the DistanceToTarget input.

Public function Static UFunction BlueprintCallable, Category, Meta

FSequencePla...

 

SetPlayrateToMatchSpeed

(
    const FSequencePlayerReference& Se...,
    float SpeedToMatch,
    FVector2D PlayRateClamp
)

Set the play rate of the sequence player so that the speed of the animation matches in-game movement speed.