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

Classes

struct  FSplineIKSolverScratchArea
 

Functions

bool ConstrainAngularRangeUsingEuler (FQuat &InOutQuatRotation, const FQuat &InRefRotation, const FVector &InLimitMinDegrees, const FVector &InLimitMaxDegrees)
 
FTransform SolveConstraints (const FTransform &CurrentTransform, const FTransform &BaseTransform, const TArray< struct FTransformConstraint > &Constraints, const FGetGlobalTransform &OnGetGlobalTransform)
 
FQuat SolveAim (const FTransform &CurrentTransform, const FVector &TargetPosition, const FVector &AimVector, bool bUseUpVector, const FVector &UpVector, float AimClampInDegree)
 
FTransform SolveConstraints (const FTransform &CurrentTransform, const FTransform &CurrentParentTransform, const TArray< struct FConstraintData > &Constraints)
 
FQuat QuatFromEuler (const FVector &XYZAnglesInDegrees, EEulerRotationOrder RotationOrder, bool bUseUEHandyness)
 
FVector EulerFromQuat (const FQuat &Rotation, EEulerRotationOrder RotationOrder, bool bUseUEHandyness)
 
FVector ChangeEulerRotationOrder (const FVector &XYZAnglesInDegrees, EEulerRotationOrder SourceRotationOrder, EEulerRotationOrder TargetRotationOrder, bool bUseUEHandyness)
 
bool SolveCCDIK (TArray< FCCDIKChainLink > &InOutChain, const FVector &TargetPosition, float Precision, int32 MaxIteration, bool bStartFromTail, bool bEnableRotationLimit, const TArray< float > &RotationLimitPerJoints)
 
bool SolveFabrik (TArray< FFABRIKChainLink > &InOutChain, const FVector &TargetPosition, double MaximumReach, double Precision, int32 MaxIterations)
 
void SoftenIKEffectorPosition (const FVector &RootLocation, const float TotalChainLength, const float SoftLengthPercent, const float Alpha, FVector &InOutEffectorPosition)
 
void SolveSplineIK (const TArray< FTransform > &BoneTransforms, const FInterpCurveVector &PositionSpline, const FInterpCurveQuat &RotationSpline, const FInterpCurveVector &ScaleSpline, const float TotalSplineAlpha, const float TotalSplineLength, const FFloatMapping &Twist, const float Roll, const float Stretch, const float Offset, const EAxis::Type BoneAxis, const FFindParamAtFirstSphereIntersection &FindParamAtFirstSphereIntersection, const TArray< FQuat > &BoneOffsetRotations, const TArray< float > &BoneLengths, const float OriginalSplineLength, TArray< FTransform > &OutBoneTransforms)
 
void SolveTwoBoneIK (FTransform &InOutRootTransform, FTransform &InOutJointTransform, FTransform &InOutEndTransform, const FVector &JointTarget, const FVector &Effector, bool bAllowStretching, double StartStretchRatio, double MaxStretchScale)
 
void SolveTwoBoneIK (FTransform &InOutRootTransform, FTransform &InOutJointTransform, FTransform &InOutEndTransform, const FVector &JointTarget, const FVector &Effector, double UpperLimbLength, double LowerLimbLength, bool bAllowStretching, double StartStretchRatio, double MaxStretchScale)
 
void SolveTwoBoneIK (const FVector &RootPos, const FVector &JointPos, const FVector &EndPos, const FVector &JointTarget, const FVector &Effector, FVector &OutJointPos, FVector &OutEndPos, bool bAllowStretching, double StartStretchRatio, double MaxStretchScale)
 
void SolveTwoBoneIK (const FVector &RootPos, const FVector &JointPos, const FVector &EndPos, const FVector &JointTarget, const FVector &Effector, FVector &OutJointPos, FVector &OutEndPos, double UpperLimbLength, double LowerLimbLength, bool bAllowStretching, double StartStretchRatio, double MaxStretchScale)
 

Function Documentation

◆ ChangeEulerRotationOrder()

FVector AnimationCore::ChangeEulerRotationOrder ( const FVector XYZAnglesInDegrees,
EEulerRotationOrder  SourceRotationOrder,
EEulerRotationOrder  TargetRotationOrder,
bool  bUseUEHandyness = false 
)

Converts a euler rotation from one rotation order to another

◆ ConstrainAngularRangeUsingEuler()

bool AnimationCore::ConstrainAngularRangeUsingEuler ( FQuat InOutQuatRotation,
const FQuat InRefRotation,
const FVector InLimitMinDegrees,
const FVector InLimitMaxDegrees 
)

◆ EulerFromQuat()

FVector AnimationCore::EulerFromQuat ( const FQuat Rotation,
EEulerRotationOrder  RotationOrder = EEulerRotationOrder::ZYX,
bool  bUseUEHandyness = false 
)

Converts a quaternion to a euler rotation represented by a vector of rotations in degrees and a rotation order bUseUEHandyness If True will use UE handyness with right handed X and Y angles left handed Z, if False all are left handed

◆ QuatFromEuler()

FQuat AnimationCore::QuatFromEuler ( const FVector XYZAnglesInDegrees,
EEulerRotationOrder  RotationOrderr = EEulerRotationOrder::ZYX,
bool  bUseUEHandyness = false 
)

Converts a euler rotation represented by a vector of rotations in degrees and a rotation order to a quaternion bUseUEHandyness If True will use UE handyness with right handed X and Y angles left handed Z, if False all are left handed

◆ SoftenIKEffectorPosition()

void AnimationCore::SoftenIKEffectorPosition ( const FVector RootLocation,
const float  TotalChainLength,
const float  SoftLengthPercent,
const float  Alpha,
FVector InOutEffectorPosition 
)

Soft IK

This modifies the effector position for a chain of joints being controlled by IK by making the effector softly approach full extension. It takes the desired effector position and adjusts it according to an exponential falloff as the effector approach the full length of the chain.

The technique used is described here: https://web.archive.org/web/20160610183037/https://softimageblog.com/archives/108

Parameters
RootLocationThe location of the bone at the root of the chain
TotalChainLengthThe total length of the chain from root to tip, along the bones (not straight line).
SoftLengthPercentThe percentage of the chain length to begin softening the effector motion (typically set to 0.97)
AlphaThe amount of softness to apply (0 is none, 1 is full amount). Default is 1.
InOutEffectorPositionThe input position of the end effector. This is modified by this function to "soften" the IK.

◆ SolveAim()

FQuat AnimationCore::SolveAim ( const FTransform CurrentTransform,
const FVector TargetPosition,
const FVector AimVector,
bool  bUseUpVector = false,
const FVector UpVector = FVector::UpVector,
float  AimClampInDegree = 0.f 
)

Aim solver

This solves new transform that aims at the target based on inputs

Parameters
CurrentTransformCurrent Transform
TargetPositionTarget to look at
AimVectorAim vector in Current Transform
bUseUpVectorWhether or not to use Up vector
UpVectorUp Vector in Current Transform if bUseUpVector is true
AimClampInDegreeClamp cone around the AimVector
Returns
Delta Rotation to turn

◆ SolveCCDIK()

bool AnimationCore::SolveCCDIK ( TArray< FCCDIKChainLink > &  InOutChain,
const FVector TargetPosition,
float  Precision,
int32  MaxIteration,
bool  bStartFromTail,
bool  bEnableRotationLimit,
const TArray< float > &  RotationLimitPerJoints 
)

◆ SolveConstraints() [1/2]

FTransform AnimationCore::SolveConstraints ( const FTransform CurrentTransform,
const FTransform BaseTransform,
const TArray< FTransformConstraint > &  Constraints,
const FGetGlobalTransform OnGetGlobalTransform 
)

Resolve Constraints based on input constraints data and current transform

Parameters
CurrentTransformCurrent transform, based on BaseTransform
BaseTransformBase transform of the current transform, where Constraint transform would be converted
ConstraintsList of constraints to be used by this transform
OnGetGlobalTransformDelegate to get transform data for constraints
Returns
resolved transform

◆ SolveConstraints() [2/2]

FTransform AnimationCore::SolveConstraints ( const FTransform CurrentTransform,
const FTransform CurrentParentTransform,
const TArray< FConstraintData > &  Constraints 
)

Resolve Constraints based on input constraints data and current transform

Parameters
CurrentTransformCurrent transform, based on BaseTransform
BaseTransformBase transform of the current transform, where Constraint transform would be converted
ConstraintsList of constraints - should contains latest transform
Returns
resolved transform

◆ SolveFabrik()

bool AnimationCore::SolveFabrik ( TArray< FFABRIKChainLink > &  InOutChain,
const FVector TargetPosition,
double  MaximumReach,
double  Precision,
int32  MaxIteration 
)

Fabrik solver

This solves FABRIK

Parameters
ChainArray of chain data
TargetPositionTarget for the IK
MaximumReachMaximum Reach
PrecisionPrecision
MaxIterationNumber of Max Iteration
Returns
true if modified. False if not.

◆ SolveSplineIK()

void AnimationCore::SolveSplineIK ( const TArray< FTransform > &  BoneTransforms,
const FInterpCurveVector PositionSpline,
const FInterpCurveQuat RotationSpline,
const FInterpCurveVector ScaleSpline,
const float  TotalSplineAlpha,
const float  TotalSplineLength,
const FFloatMapping Twist,
const float  Roll,
const float  Stretch,
const float  Offset,
const EAxis::Type  BoneAxis,
const FFindParamAtFirstSphereIntersection FindParamAtFirstSphereIntersection,
const TArray< FQuat > &  BoneOffsetRotations,
const TArray< float > &  BoneLengths,
const float  OriginalSplineLength,
TArray< FTransform > &  OutBoneTransforms 
)

◆ SolveTwoBoneIK() [1/4]

void AnimationCore::SolveTwoBoneIK ( const FVector RootPos,
const FVector JointPos,
const FVector EndPos,
const FVector JointTarget,
const FVector Effector,
FVector OutJointPos,
FVector OutEndPos,
bool  bAllowStretching,
double  StartStretchRatio,
double  MaxStretchScale 
)

Two Bone IK

This handles two bone chain link excluding root bone. This will solve the solution for joint/end when given root, joint, end position (root->joint->end in the hierarchy) based on effector, joint target location This only solves for location, if you want to rotate them to face target, this doesn't do it for you

Parameters
RootPosRoot position
JointPosJoint position
EndPosEnd position
JointTargetJoint Target position (where joint is facing while creating plane between joint pos, joint target, root pos(rotate-plane ik))
EffectorEffector position (target position)
OutJointPos(out) adjusted joint pos
OutEndPos(out) adjusted end pos
bAllowStretchingwhether or not to allow stretching or not
StartStretchRatioWhen should it start stretch -i.e. 1 means its own length without any stretch
MaxStretchScaleHow much it can stretch to in ratio

◆ SolveTwoBoneIK() [2/4]

void AnimationCore::SolveTwoBoneIK ( const FVector RootPos,
const FVector JointPos,
const FVector EndPos,
const FVector JointTarget,
const FVector Effector,
FVector OutJointPos,
FVector OutEndPos,
double  UpperLimbLength,
double  LowerLimbLength,
bool  bAllowStretching,
double  StartStretchRatio,
double  MaxStretchScale 
)

Two Bone IK

This handles two bone chain link excluding root bone. This will solve the solution for joint/end when given root, joint, end position (root->joint->end in the hierarchy) based on effector, joint target location This only solves for location, if you want to rotate them to face target, this doesn't do it for you

Parameters
RootPosRoot position
JointPosJoint position
EndPosEnd position
JointTargetJoint Target position (where joint is facing while creating plane between joint pos, joint target, root pos(rotate-plane ik))
EffectorEffector position (target position)
OutJointPos(out) adjusted joint pos
OutEndPos(out) adjusted end pos
bAllowStretchingwhether or not to allow stretching or not O
StartStretchRatioWhen should it start stretch -i.e. 1 means its own length without any stretch
MaxStretchScaleHow much it can stretch to in ratio

◆ SolveTwoBoneIK() [3/4]

void AnimationCore::SolveTwoBoneIK ( FTransform InOutRootTransform,
FTransform InOutJointTransform,
FTransform InOutEndTransform,
const FVector JointTarget,
const FVector Effector,
bool  bAllowStretching,
double  StartStretchRatio,
double  MaxStretchScale 
)

Two Bone IK

This handles two bone chain link excluding root bone. This will solve the solution for joint/end when given root, joint, end position (root->joint->end in the hierarchy) based on effector, joint target location This only solves for location, if you want to rotate them to face target, this doesn't do it for you

Parameters
RootPosRoot position
JointPosJoint position
EndPosEnd position
JointTargetJoint Target position (where joint is facing while creating plane between joint pos, joint target, root pos(rotate-plane ik))
EffectorEffector position (target position)
OutJointPos(out) adjusted joint pos
OutEndPos(out) adjusted end pos
bAllowStretchingwhether or not to allow stretching or not
StartStretchRatioWhen should it start stretch -i.e. 1 means its own length without any stretch
MaxStretchScaleHow much it can stretch to in ratio

◆ SolveTwoBoneIK() [4/4]

void AnimationCore::SolveTwoBoneIK ( FTransform InOutRootTransform,
FTransform InOutJointTransform,
FTransform InOutEndTransform,
const FVector JointTarget,
const FVector Effector,
double  UpperLimbLength,
double  LowerLimbLength,
bool  bAllowStretching,
double  StartStretchRatio,
double  MaxStretchScale 
)

Two Bone IK

This handles two bone chain link excluding root bone. This will solve the solution for joint/end when given root, joint, end position (root->joint->end in the hierarchy) based on effector, joint target location This only solves for location, if you want to rotate them to face target, this doesn't do it for you

Parameters
RootPosRoot position
JointPosJoint position
EndPosEnd position
JointTargetJoint Target position (where joint is facing while creating plane between joint pos, joint target, root pos(rotate-plane ik))
EffectorEffector position (target position)
OutJointPos(out) adjusted joint pos
OutEndPos(out) adjusted end pos
bAllowStretchingwhether or not to allow stretching or not
StartStretchRatioWhen should it start stretch -i.e. 1 means its own length without any stretch
MaxStretchScaleHow much it can stretch to in ratio