Navigation
API > API/Runtime > API/Runtime/AnimGraphRuntime
Description
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
| Name | CommonAnimationLibrary::RetargetSingleRotation |
| Type | function |
| Header File | /Engine/Source/Runtime/AnimGraphRuntime/Public/CommonAnimationLibrary.h |
| Include Path | #include "CommonAnimationLibrary.h" |
| Source | /Engine/Source/Runtime/AnimGraphRuntime/Private/CommonAnimationLibrary.cpp |
namespace CommonAnimationLibrary
{
FQuat CommonAnimationLibrary::RetargetSingleRotation
(
const FQuat & Rotation,
const FTransform & Source,
const FTransform & Target,
const FRuntimeFloatCurve & CustomCurve,
EEasingFuncType EasingType,
bool bFlipEasing,
float EasingWeight,
ERotationComponent RotationComponent,
FVector TwistAxis,
bool bUseAbsoluteAngle,
float SourceMinimum,
float SourceMaximum,
float TargetMinimum,
float TargetMaximum
)
}
Parameters
| Name | Remarks |
|---|---|
| Rotation | The input rotation to be retargeted |
| Source | The transform to be used as the frame of reference |
| Target | The transform to be used as the target space |
| CustomCurve | The curve to use if the easing type is "Custom" |
| bFlipEasing | If set to true the easing is flipping around |
| EasingWeight | The amount of easing to use against linear (0.0 to 1.0) |
| RotationComponent | The component of the rotation to retarget |
| TwistAxis | The axis to use when extracting swing / twist rotations |
| bUseAbsoluteAngle | If set to true negative angles will be flipped to positive. This can be used to mirror the rotation. |
| SourceMinimum | The minimum of the source range in degrees |
| SourceMaximum | The maximum of the source range in degrees |
| TargetMinimum | The minimum of the target range in degrees |
| TargetMaximum | The maximum of the target range in degrees |
| EasingType | The type of easing to apply |