UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
CommonAnimationLibrary Namespace Reference

Functions

ANIMGRAPHRUNTIME_API float ScalarEasing (float Value, const FRuntimeFloatCurve &CustomCurve, EEasingFuncType EasingType=EEasingFuncType::Linear, bool bFlip=false, float Weight=1.f)
 
ANIMGRAPHRUNTIME_API FVector RetargetSingleLocation (FVector Location, const FTransform &Source, const FTransform &Target, const FRuntimeFloatCurve &CustomCurve, EEasingFuncType EasingType=EEasingFuncType::Linear, bool bFlipEasing=false, float EasingWeight=1.f, FVector Axis=FVector(1.f, 0.f, 0.f), float SourceMinimum=-1.f, float SourceMaximum=1.f, float TargetMinimum=-1.f, float TargetMaximum=1.f)
 
ANIMGRAPHRUNTIME_API FQuat RetargetSingleRotation (const FQuat &Rotation, const FTransform &Source, const FTransform &Target, const FRuntimeFloatCurve &CustomCurve, EEasingFuncType EasingType=EEasingFuncType::Linear, bool bFlipEasing=false, float EasingWeight=1.f, ERotationComponent RotationComponent=ERotationComponent::SwingAngle, FVector TwistAxis=FVector(1.f, 0.f, 0.f), bool bUseAbsoluteAngle=false, float SourceMinimum=0.0f, float SourceMaximum=45.f, float TargetMinimum=0.f, float TargetMaximum=45.f)
 

Detailed Description

A library of the most common animation functions.

Function Documentation

◆ RetargetSingleLocation()

FVector CommonAnimationLibrary::RetargetSingleLocation ( FVector  Location,
const FTransform Source,
const FTransform Target,
const FRuntimeFloatCurve CustomCurve,
EEasingFuncType  EasingType = EEasingFuncType::Linear,
bool  bFlipEasing = false,
float  EasingWeight = 1.f,
FVector  Axis = FVector(1.f, 0.f, 0.f),
float  SourceMinimum = -1.f,
float  SourceMaximum = 1.f,
float  TargetMinimum = -1.f,
float  TargetMaximum = 1.f 
)

This function performs retargeting of translation using an easing function. For this a range of motion needs to be defined given a direction and the constraints.

Parameters
LocationThe input location to be retargeted
SourceThe transform to be used as the frame of reference
TargetThe transform to be used as the target space
AxisThe direction to use for the range measurement. Defaults to (1.0, 0.0, 0.0)
SourceMinimumThe minimum of the source range
SourceMaximumThe maximum of the source range
TargetMinimumThe minimum of the target range
TargetMaximumThe maximum of the target range
EasingTypeThe type of easing to apply
CustomCurveThe curve to use if the easing type is "Custom"
bFlipEasingIf set to true the easing is flipping around
EasingWeightThe amount of easing to use against linear (0.0 to 1.0)

◆ RetargetSingleRotation()

FQuat CommonAnimationLibrary::RetargetSingleRotation ( const FQuat Rotation,
const FTransform Source,
const FTransform Target,
const FRuntimeFloatCurve CustomCurve,
EEasingFuncType  EasingType = EEasingFuncType::Linear,
bool  bFlipEasing = false,
float  EasingWeight = 1.f,
ERotationComponent  RotationComponent = ERotationComponent::SwingAngle,
FVector  TwistAxis = FVector(1.f, 0.f, 0.f),
bool  bUseAbsoluteAngle = false,
float  SourceMinimum = 0.0f,
float  SourceMaximum = 45.f,
float  TargetMinimum = 0.f,
float  TargetMaximum = 45.f 
)

This function performs retargeting of rotation using an easing function. For this a range of motion needs to be defined as a euler angle, swing angle or twist

Parameters
RotationThe input rotation to be retargeted
SourceThe transform to be used as the frame of reference
TargetThe transform to be used as the target space
CustomCurveThe curve to use if the easing type is "Custom"
bFlipEasingIf set to true the easing is flipping around
EasingWeightThe amount of easing to use against linear (0.0 to 1.0)
RotationComponentThe component of the rotation to retarget
TwistAxisThe axis to use when extracting swing / twist rotations
bUseAbsoluteAngleIf set to true negative angles will be flipped to positive. This can be used to mirror the rotation.
SourceMinimumThe minimum of the source range in degrees
SourceMaximumThe maximum of the source range in degrees
TargetMinimumThe minimum of the target range in degrees
TargetMaximumThe maximum of the target range in degrees
EasingTypeThe type of easing to apply

◆ ScalarEasing()

float CommonAnimationLibrary::ScalarEasing ( float  Value,
const FRuntimeFloatCurve CustomCurve,
EEasingFuncType  EasingType = EEasingFuncType::Linear,
bool  bFlip = false,
float  Weight = 1.f 
)

This function perform easing on a float value using a variety of easing types.

Parameters
ValueThe float value to ease
EasingTypeThe easing function to use
CustomCurveThe curve to use if the easing type is "Custom"
bFlipIf set to true the easing is flipping around
WeightThe amount of easing to use against linear (0.0 to 1.0)