UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FAnimNode_Trail Struct Reference

#include <AnimNode_Trail.h>

+ Inheritance diagram for FAnimNode_Trail:

Public Member Functions

ANIMGRAPHRUNTIME_API FAnimNode_Trail ()
 
virtual ANIMGRAPHRUNTIME_API void Initialize_AnyThread (const FAnimationInitializeContext &Context) override
 
virtual ANIMGRAPHRUNTIME_API void UpdateInternal (const FAnimationUpdateContext &Context) override
 
virtual ANIMGRAPHRUNTIME_API void GatherDebugData (FNodeDebugData &DebugData) override
 
virtual ANIMGRAPHRUNTIME_API void EvaluateSkeletalControl_AnyThread (FComponentSpacePoseContext &Output, TArray< FBoneTransform > &OutBoneTransforms) override
 
virtual ANIMGRAPHRUNTIME_API bool IsValidToEvaluate (const USkeleton *Skeleton, const FBoneContainer &RequiredBones) override
 
ANIMGRAPHRUNTIME_API void PostLoad ()
 
- Public Member Functions inherited from FAnimNode_SkeletalControlBase
 FAnimNode_SkeletalControlBase ()
 
virtual ~FAnimNode_SkeletalControlBase ()
 
virtual ANIMGRAPHRUNTIME_API void CacheBones_AnyThread (const FAnimationCacheBonesContext &Context) override
 
virtual ANIMGRAPHRUNTIME_API void Update_AnyThread (const FAnimationUpdateContext &Context) final
 
virtual ANIMGRAPHRUNTIME_API void EvaluateComponentSpace_AnyThread (FComponentSpacePoseContext &Output) final
 
virtual int32 GetLODThreshold () const override
 
ANIMGRAPHRUNTIME_API void SetAlpha (float InAlpha)
 
ANIMGRAPHRUNTIME_API float GetAlpha () const
 
ANIMGRAPHRUNTIME_API void InitializeAndValidateBoneRef (FBoneReference &BoneRef, const FBoneContainer &RequiredBones)
 
- Public Member Functions inherited from FAnimNode_Base
virtual ENGINE_API void Evaluate_AnyThread (FPoseContext &Output)
 
virtual bool CanUpdateInWorkerThread () const
 
virtual bool HasPreUpdate () const
 
virtual void PreUpdate (const UAnimInstance *InAnimInstance)
 
virtual bool NeedsDynamicReset () const
 
virtual ENGINE_API void ResetDynamics (ETeleportType InTeleportType)
 
virtual void PostCompile (const class USkeleton *InSkeleton)
 
virtual bool NeedsOnInitializeAnimInstance () const
 
virtual ~FAnimNode_Base ()
 
virtual void ResetDynamics ()
 
virtual bool WantsSkippedUpdates () const
 
virtual void OnUpdatesSkipped (TArrayView< const FAnimationUpdateContext * > SkippedUpdateContexts)
 
virtual void OverrideAsset (class UAnimationAsset *NewAsset)
 
ENGINE_API const FExposedValueHandlerGetEvaluateGraphExposedInputs () const
 
void SetExposedValueHandler (const FExposedValueHandler *Handler)
 
int32 GetNodeIndex () const
 
const IAnimClassInterfaceGetAnimClassInterface () const
 

Public Attributes

FTransform OldBaseTransform
 
FBoneReference TrailBone
 
int32 ChainLength
 
TEnumAsByte< EAxis::TypeChainBoneAxis
 
uint8 bInvertChainBoneAxis:1
 
uint8 bLimitStretch:1
 
uint8 bLimitRotation:1
 
uint8 bUsePlanarLimit:1
 
uint8 bActorSpaceFakeVel:1
 
uint8 bReorientParentToChild:1
 
uint8 bHadValidStrength:1
 
float MaxDeltaTime
 
float RelaxationSpeedScale
 
FRuntimeFloatCurve TrailRelaxationSpeed
 
FInputScaleBiasClamp RelaxationSpeedScaleInputProcessor
 
TArray< FRotationLimitRotationLimits
 
TArray< FVectorRotationOffsets
 
TArray< FAnimPhysPlanarLimitPlanarLimits
 
float StretchLimit
 
FVector FakeVelocity
 
FBoneReference BaseJoint
 
float LastBoneRotationAnimAlphaBlend
 
float ThisTimstep
 
TArray< FVectorTrailBoneLocations
 
TArray< FPerJointTrailSetupPerJointTrailData
 
- Public Attributes inherited from FAnimNode_SkeletalControlBase
FComponentSpacePoseLink ComponentPose
 
int32 LODThreshold
 
float ActualAlpha
 
EAnimAlphaInputType AlphaInputType
 
bool bAlphaBoolEnabled
 
float Alpha
 
FInputScaleBias AlphaScaleBias
 
FInputAlphaBoolBlend AlphaBoolBlend
 
FName AlphaCurveName
 
FInputScaleBiasClamp AlphaScaleBiasClamp
 

Additional Inherited Members

- Protected Member Functions inherited from FAnimNode_SkeletalControlBase
virtual ANIMGRAPHRUNTIME_API void UpdateComponentPose_AnyThread (const FAnimationUpdateContext &Context)
 
virtual ANIMGRAPHRUNTIME_API void EvaluateComponentPose_AnyThread (FComponentSpacePoseContext &Output)
 
virtual ANIMGRAPHRUNTIME_API void EvaluateComponentSpaceInternal (FComponentSpacePoseContext &Context)
 
ANIMGRAPHRUNTIME_API void AddDebugNodeData (FString &OutDebugData)
 
- Protected Member Functions inherited from FAnimNode_Base
template<typename DataType >
const DataType & GetData (UE::Anim::FNodeDataId InId, const UObject *InObject=nullptr) const
 
template<typename DataType >
DataType * GetInstanceDataPtr (UE::Anim::FNodeDataId InId, UObject *InObject=nullptr)
 
ENGINE_API bool IsLODEnabled (FAnimInstanceProxy *AnimInstanceProxy)
 
virtual ENGINE_API void OnInitializeAnimInstance (const FAnimInstanceProxy *InProxy, const UAnimInstance *InAnimInstance)
 

Detailed Description

Trail Controller

Constructor & Destructor Documentation

◆ FAnimNode_Trail()

FAnimNode_Trail::FAnimNode_Trail ( )

Member Function Documentation

◆ EvaluateSkeletalControl_AnyThread()

void FAnimNode_Trail::EvaluateSkeletalControl_AnyThread ( FComponentSpacePoseContext Output,
TArray< FBoneTransform > &  OutBoneTransforms 
)
overridevirtual

Reimplemented from FAnimNode_SkeletalControlBase.

◆ GatherDebugData()

void FAnimNode_Trail::GatherDebugData ( FNodeDebugData DebugData)
overridevirtual

Called to gather on-screen debug data. This is called on the game thread.

Parameters
DebugDataDebug data structure used to output any relevant data

Reimplemented from FAnimNode_Base.

◆ Initialize_AnyThread()

void FAnimNode_Trail::Initialize_AnyThread ( const FAnimationInitializeContext Context)
overridevirtual

Called when the node first runs. If the node is inside a state machine or cached pose branch then this can be called multiple times. This can be called on any thread.

Parameters
ContextContext structure providing access to relevant data

Reimplemented from FAnimNode_SkeletalControlBase.

◆ IsValidToEvaluate()

bool FAnimNode_Trail::IsValidToEvaluate ( const USkeleton Skeleton,
const FBoneContainer RequiredBones 
)
overridevirtual

Reimplemented from FAnimNode_SkeletalControlBase.

◆ PostLoad()

void FAnimNode_Trail::PostLoad ( )

◆ UpdateInternal()

void FAnimNode_Trail::UpdateInternal ( const FAnimationUpdateContext Context)
overridevirtual

Reimplemented from FAnimNode_SkeletalControlBase.

Member Data Documentation

◆ bActorSpaceFakeVel

uint8 FAnimNode_Trail::bActorSpaceFakeVel

Whether 'fake' velocity should be applied in actor or world space.

◆ BaseJoint

FBoneReference FAnimNode_Trail::BaseJoint

Base Joint to calculate velocity from. If none, it will use Component's World Transform. .

◆ bHadValidStrength

uint8 FAnimNode_Trail::bHadValidStrength

Did we have a non-zero ControlStrength last frame.

◆ bInvertChainBoneAxis

uint8 FAnimNode_Trail::bInvertChainBoneAxis

Invert the direction specified in ChainBoneAxis.

◆ bLimitRotation

uint8 FAnimNode_Trail::bLimitRotation

Limit the amount that a bone can stretch from its ref-pose length.

◆ bLimitStretch

uint8 FAnimNode_Trail::bLimitStretch

Limit the amount that a bone can stretch from its ref-pose length.

◆ bReorientParentToChild

uint8 FAnimNode_Trail::bReorientParentToChild

Fix up rotation to face child for the parent

◆ bUsePlanarLimit

uint8 FAnimNode_Trail::bUsePlanarLimit

Whether to evaluate planar limits

◆ ChainBoneAxis

TEnumAsByte<EAxis::Type> FAnimNode_Trail::ChainBoneAxis

Axis of the bones to point along trail.

◆ ChainLength

int32 FAnimNode_Trail::ChainLength

Number of bones above the active one in the hierarchy to modify. ChainLength should be at least 2.

◆ FakeVelocity

FVector FAnimNode_Trail::FakeVelocity

'Fake' velocity applied to bones.

◆ LastBoneRotationAnimAlphaBlend

float FAnimNode_Trail::LastBoneRotationAnimAlphaBlend

◆ MaxDeltaTime

float FAnimNode_Trail::MaxDeltaTime

To avoid hitches causing stretch of trail, you can use MaxDeltaTime to clamp the long delta time. If you want 30 fps to set it to 0.03333f ( = 1/30 ).

◆ OldBaseTransform

FTransform FAnimNode_Trail::OldBaseTransform

LocalToWorld used last frame, used for building transform between frames.

◆ PerJointTrailData

TArray<FPerJointTrailSetup> FAnimNode_Trail::PerJointTrailData

Per Joint Trail Set up

◆ PlanarLimits

TArray<FAnimPhysPlanarLimit> FAnimNode_Trail::PlanarLimits

List of available planar limits for this node

◆ RelaxationSpeedScale

float FAnimNode_Trail::RelaxationSpeedScale

◆ RelaxationSpeedScaleInputProcessor

FInputScaleBiasClamp FAnimNode_Trail::RelaxationSpeedScaleInputProcessor

◆ RotationLimits

TArray<FRotationLimit> FAnimNode_Trail::RotationLimits

◆ RotationOffsets

TArray<FVector> FAnimNode_Trail::RotationOffsets

◆ StretchLimit

float FAnimNode_Trail::StretchLimit

If bLimitStretch is true, this indicates how long a bone can stretch beyond its length in the ref-pose.

◆ ThisTimstep

float FAnimNode_Trail::ThisTimstep

Internal use - we need the timestep to do the relaxation in CalculateNewBoneTransforms.

◆ TrailBone

FBoneReference FAnimNode_Trail::TrailBone

Reference to the active bone in the hierarchy to modify.

◆ TrailBoneLocations

TArray<FVector> FAnimNode_Trail::TrailBoneLocations

Component-space locations of the bones from last frame. Each frame these are moved towards their 'animated' locations.

◆ TrailRelaxationSpeed

FRuntimeFloatCurve FAnimNode_Trail::TrailRelaxationSpeed

How quickly we 'relax' the bones to their animated positions. Time 0 will map to top root joint, time 1 will map to the bottom joint.


The documentation for this struct was generated from the following files: