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

#include <AnimNode_AnimDynamics.h>

+ Inheritance diagram for FAnimNode_AnimDynamics:

Public Member Functions

 GENERATED_BODY ()
 
ANIMGRAPHRUNTIME_API FAnimNode_AnimDynamics ()
 
virtual ANIMGRAPHRUNTIME_API void Initialize_AnyThread (const FAnimationInitializeContext &Context) override
 
virtual ANIMGRAPHRUNTIME_API void UpdateInternal (const FAnimationUpdateContext &Context) override
 
virtual ANIMGRAPHRUNTIME_API void EvaluateSkeletalControl_AnyThread (FComponentSpacePoseContext &Output, TArray< FBoneTransform > &OutBoneTransforms) override
 
virtual ANIMGRAPHRUNTIME_API void GatherDebugData (FNodeDebugData &DebugData) override
 
virtual ANIMGRAPHRUNTIME_API bool HasPreUpdate () const override
 
virtual ANIMGRAPHRUNTIME_API void PreUpdate (const UAnimInstance *InAnimInstance) override
 
virtual bool NeedsDynamicReset () const override
 
virtual void ResetDynamics (ETeleportType InTeleportType) override
 
virtual ANIMGRAPHRUNTIME_API int32 GetLODThreshold () const override
 
ANIMGRAPHRUNTIME_API void RequestInitialise (ETeleportType InTeleportType)
 
ANIMGRAPHRUNTIME_API void InitPhysics (FComponentSpacePoseContext &Output)
 
ANIMGRAPHRUNTIME_API void TermPhysics ()
 
ANIMGRAPHRUNTIME_API void UpdateChainPhysicsBodyDefinitions (const FReferenceSkeleton &ReferenceSkeleton)
 
ANIMGRAPHRUNTIME_API void ValidateChainPhysicsBodyDefinitions (const FReferenceSkeleton &ReferenceSkeleton)
 
ANIMGRAPHRUNTIME_API void FindChainBoneNames (const FReferenceSkeleton &ReferenceSkeleton, TArray< FName > &ChainBoneNames)
 
ANIMGRAPHRUNTIME_API void UpdateLimits (FComponentSpacePoseContext &Output)
 
ANIMGRAPHRUNTIME_API int32 GetNumBodies () const
 
ANIMGRAPHRUNTIME_API const FAnimPhysRigidBodyGetPhysBody (int32 BodyIndex) const
 
ANIMGRAPHRUNTIME_API FTransform GetBodyComponentSpaceTransform (const FAnimPhysRigidBody &Body, const USkeletalMeshComponent *const SkelComp) const
 
ANIMGRAPHRUNTIME_API bool ShouldDoPhysicsUpdate () const
 
- 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
 
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 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
 

Static Public Member Functions

static ANIMGRAPHRUNTIME_API bool IsAnimDynamicsSystemEnabledFor (int32 InLOD)
 

Public Attributes

float LinearDampingOverride
 
float AngularDampingOverride
 
FTransform PreviousCompWorldSpaceTM
 
FTransform PreviousActorWorldSpaceTM
 
FTransform PreviousSimSpaceTM
 
FBoneReference RelativeSpaceBone
 
FBoneReference BoundBone
 
FBoneReference ChainEnd
 
TArray< FAnimPhysBodyDefinitionPhysicsBodyDefinitions
 
float GravityScale
 
FVector GravityOverride
 
float LinearSpringConstant
 
float AngularSpringConstant
 
float WindScale
 
FVector ComponentLinearAccScale
 
FVector ComponentLinearVelScale
 
FVector ComponentAppliedLinearAccClamp
 
FAnimPhysSimSpaceSettings SimSpaceSettings
 
float AngularBiasOverride
 
int32 NumSolverIterationsPreUpdate
 
int32 NumSolverIterationsPostUpdate
 
TArray< FAnimPhysSphericalLimitSphericalLimits
 
FVector ExternalForce
 
TArray< FAnimPhysPlanarLimitPlanarLimits
 
AnimPhysSimSpaceType SimulationSpace
 
AnimPhysSimSpaceType LastSimSpace
 
ETeleportType InitTeleportType
 
uint8 bUseSphericalLimits:1
 
uint8 bUsePlanarLimit:1
 
uint8 bDoUpdate: 1
 
uint8 bDoEval: 1
 
uint8 bOverrideLinearDamping:1
 
uint8 bOverrideAngularBias:1
 
uint8 bOverrideAngularDamping:1
 
uint8 bEnableWind:1
 
uint8 bWindWasEnabled:1
 
uint8 bUseGravityOverride:1
 
uint8 bGravityOverrideInSimSpace: 1
 
uint8 bLinearSpring:1
 
uint8 bAngularSpring:1
 
uint8 bChain:1
 
FRotationRetargetingInfo RetargetingSettings
 
- 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
 

Protected Member Functions

virtual ANIMGRAPHRUNTIME_API void InitializeBoneReferences (const FBoneContainer &RequiredBones) override
 
virtual ANIMGRAPHRUNTIME_API bool IsValidToEvaluate (const USkeleton *Skeleton, const FBoneContainer &RequiredBones)
 
- 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)
 

Constructor & Destructor Documentation

◆ FAnimNode_AnimDynamics()

FAnimNode_AnimDynamics::FAnimNode_AnimDynamics ( )

Member Function Documentation

◆ EvaluateSkeletalControl_AnyThread()

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

Reimplemented from FAnimNode_SkeletalControlBase.

◆ FindChainBoneNames()

void FAnimNode_AnimDynamics::FindChainBoneNames ( const FReferenceSkeleton ReferenceSkeleton,
TArray< FName > &  ChainBoneNames 
)

◆ GatherDebugData()

void FAnimNode_AnimDynamics::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.

◆ GENERATED_BODY()

FAnimNode_AnimDynamics::GENERATED_BODY ( )

◆ GetBodyComponentSpaceTransform()

FTransform FAnimNode_AnimDynamics::GetBodyComponentSpaceTransform ( const FAnimPhysRigidBody Body,
const USkeletalMeshComponent *const  SkelComp 
) const

◆ GetLODThreshold()

int32 FAnimNode_AnimDynamics::GetLODThreshold ( ) const
overridevirtual

Get the LOD level at which this node is enabled. Node is enabled if the current LOD is less than or equal to this threshold.

Reimplemented from FAnimNode_SkeletalControlBase.

◆ GetNumBodies()

int32 FAnimNode_AnimDynamics::GetNumBodies ( ) const

◆ GetPhysBody()

const FAnimPhysRigidBody & FAnimNode_AnimDynamics::GetPhysBody ( int32  BodyIndex) const

◆ HasPreUpdate()

bool FAnimNode_AnimDynamics::HasPreUpdate ( ) const
overridevirtual

Override this to indicate that PreUpdate() should be called on the game thread (usually to gather non-thread safe data) before Update() is called. Note that this is called at load on the UAnimInstance CDO to avoid needing to call this at runtime. This is called on the game thread.

Reimplemented from FAnimNode_Base.

◆ Initialize_AnyThread()

void FAnimNode_AnimDynamics::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.

◆ InitializeBoneReferences()

void FAnimNode_AnimDynamics::InitializeBoneReferences ( const FBoneContainer RequiredBones)
overrideprotectedvirtual

Reimplemented from FAnimNode_SkeletalControlBase.

◆ InitPhysics()

void FAnimNode_AnimDynamics::InitPhysics ( FComponentSpacePoseContext Output)

◆ IsAnimDynamicsSystemEnabledFor()

bool FAnimNode_AnimDynamics::IsAnimDynamicsSystemEnabledFor ( int32  InLOD)
static

◆ IsValidToEvaluate()

bool FAnimNode_AnimDynamics::IsValidToEvaluate ( const USkeleton Skeleton,
const FBoneContainer RequiredBones 
)
protectedvirtual

Reimplemented from FAnimNode_SkeletalControlBase.

◆ NeedsDynamicReset()

virtual bool FAnimNode_AnimDynamics::NeedsDynamicReset ( ) const
inlineoverridevirtual

For nodes that implement some kind of simulation, return true here so ResetDynamics() gets called when things like teleports, time skips etc. occur that might require special handling. Note that this is called at load on the UAnimInstance CDO to avoid needing to call this at runtime. This is called on the game thread.

Reimplemented from FAnimNode_Base.

◆ PreUpdate()

void FAnimNode_AnimDynamics::PreUpdate ( const UAnimInstance InAnimInstance)
overridevirtual

Override this to perform game-thread work prior to non-game thread Update() being called

Reimplemented from FAnimNode_Base.

◆ RequestInitialise()

void FAnimNode_AnimDynamics::RequestInitialise ( ETeleportType  InTeleportType)

◆ ResetDynamics()

virtual void FAnimNode_AnimDynamics::ResetDynamics ( ETeleportType  InTeleportType)
inlineoverridevirtual

Called to help dynamics-based updates to recover correctly from large movements/teleports

Reimplemented from FAnimNode_Base.

◆ ShouldDoPhysicsUpdate()

bool FAnimNode_AnimDynamics::ShouldDoPhysicsUpdate ( ) const

◆ TermPhysics()

void FAnimNode_AnimDynamics::TermPhysics ( )

◆ UpdateChainPhysicsBodyDefinitions()

void FAnimNode_AnimDynamics::UpdateChainPhysicsBodyDefinitions ( const FReferenceSkeleton ReferenceSkeleton)

◆ UpdateInternal()

void FAnimNode_AnimDynamics::UpdateInternal ( const FAnimationUpdateContext Context)
overridevirtual

Reimplemented from FAnimNode_SkeletalControlBase.

◆ UpdateLimits()

void FAnimNode_AnimDynamics::UpdateLimits ( FComponentSpacePoseContext Output)

◆ ValidateChainPhysicsBodyDefinitions()

void FAnimNode_AnimDynamics::ValidateChainPhysicsBodyDefinitions ( const FReferenceSkeleton ReferenceSkeleton)

Member Data Documentation

◆ AngularBiasOverride

float FAnimNode_AnimDynamics::AngularBiasOverride

Overridden angular bias value Angular bias is essentially a twist reduction for chain forces and defaults to a value to keep chains stability in check. When using single-body systems sometimes angular forces will look like they are "catching-up" with the mesh, if that's the case override this and push it towards 1.0f until it settles correctly

◆ AngularDampingOverride

float FAnimNode_AnimDynamics::AngularDampingOverride

Overridden angular damping value. The default is 0.7. Values below 0.7 won't have an effect.

◆ AngularSpringConstant

float FAnimNode_AnimDynamics::AngularSpringConstant

Spring constant to use when calculating angular springs, higher values mean a stronger spring. You need to enable the Angular Spring checkbox for this to have an effect. Note: Make sure to also set the Angular Target Axis and Angular Target in the Constraint Setup for this to have an effect.

◆ bAngularSpring

uint8 FAnimNode_AnimDynamics::bAngularSpring

If true the body will attempt to align itself with the specified angular target

◆ bChain

uint8 FAnimNode_AnimDynamics::bChain

Set to true to use the solver to simulate a connected chain

◆ bDoEval

uint8 FAnimNode_AnimDynamics::bDoEval

If true we will perform bone transform evaluation, otherwise skip - allows visualization of the initial anim state compared to the physics sim

◆ bDoUpdate

uint8 FAnimNode_AnimDynamics::bDoUpdate

If true we will perform physics update, otherwise skip - allows visualization of the initial state of the bodies

◆ bEnableWind

uint8 FAnimNode_AnimDynamics::bEnableWind

Whether or not wind is enabled for the bodies in this simulation

◆ bGravityOverrideInSimSpace

uint8 FAnimNode_AnimDynamics::bGravityOverrideInSimSpace

If true the gravity override value is defined in simulation space, by default it is in world space

◆ bLinearSpring

uint8 FAnimNode_AnimDynamics::bLinearSpring

If true the body will attempt to spring back to its initial position

◆ BoundBone

FBoneReference FAnimNode_AnimDynamics::BoundBone

The bone to attach the physics body to, if bChain is true this is the top of the chain

◆ bOverrideAngularBias

uint8 FAnimNode_AnimDynamics::bOverrideAngularBias

If true, the override value will be used for the angular bias for bodies in this node. Angular bias is essentially a twist reduction for chain forces and defaults to a value to keep chains stability in check. When using single-body systems sometimes angular forces will look like they are "catching-up" with the mesh, if that's the case override this and push it towards 1.0f until it settles correctly

◆ bOverrideAngularDamping

uint8 FAnimNode_AnimDynamics::bOverrideAngularDamping

If true, the override value will be used for angular damping

◆ bOverrideLinearDamping

uint8 FAnimNode_AnimDynamics::bOverrideLinearDamping

If true, the override value will be used for linear damping

◆ bUseGravityOverride

uint8 FAnimNode_AnimDynamics::bUseGravityOverride

Use gravity override value vs gravity scale

◆ bUsePlanarLimit

uint8 FAnimNode_AnimDynamics::bUsePlanarLimit

Whether to evaluate planar limits

◆ bUseSphericalLimits

uint8 FAnimNode_AnimDynamics::bUseSphericalLimits

Whether to evaluate spherical limits

◆ bWindWasEnabled

uint8 FAnimNode_AnimDynamics::bWindWasEnabled

◆ ChainEnd

FBoneReference FAnimNode_AnimDynamics::ChainEnd

If bChain is true this is the bottom of the chain, otherwise ignored

◆ ComponentAppliedLinearAccClamp

FVector FAnimNode_AnimDynamics::ComponentAppliedLinearAccClamp

When using non-world-space sim, this is an overall clamp on acceleration derived from ComponentLinearAccScale and ComponentLinearVelScale, to ensure it is not too large.

◆ ComponentLinearAccScale

FVector FAnimNode_AnimDynamics::ComponentLinearAccScale

When using non-world-space sim, this controls how much of the components world-space acceleration is passed on to the local-space simulation.

◆ ComponentLinearVelScale

FVector FAnimNode_AnimDynamics::ComponentLinearVelScale

When using non-world-space sim, this applies a 'drag' to the bodies in the local space simulation, based on the components world-space velocity.

◆ ExternalForce

FVector FAnimNode_AnimDynamics::ExternalForce

An external force to apply to all bodies in the simulation when ticked, specified in world space

◆ GravityOverride

FVector FAnimNode_AnimDynamics::GravityOverride

Gravity Override Value

◆ GravityScale

float FAnimNode_AnimDynamics::GravityScale

Scale for gravity, higher values increase forces due to gravity

◆ InitTeleportType

ETeleportType FAnimNode_AnimDynamics::InitTeleportType

◆ LastSimSpace

AnimPhysSimSpaceType FAnimNode_AnimDynamics::LastSimSpace

◆ LinearDampingOverride

float FAnimNode_AnimDynamics::LinearDampingOverride

Overridden linear damping value. The default is 0.7. Values below 0.7 won't have an effect.

◆ LinearSpringConstant

float FAnimNode_AnimDynamics::LinearSpringConstant

Spring constant to use when calculating linear springs, higher values mean a stronger spring. You need to enable the Linear Spring checkbox for this to have an effect.

◆ NumSolverIterationsPostUpdate

int32 FAnimNode_AnimDynamics::NumSolverIterationsPostUpdate

Number of update passes on the linear and angular limits after we solve the position of the bodies, recommended to be around a quarter of NumSolverIterationsPreUpdate

◆ NumSolverIterationsPreUpdate

int32 FAnimNode_AnimDynamics::NumSolverIterationsPreUpdate

Number of update passes on the linear and angular limits before we solve the position of the bodies recommended to be four times the value of NumSolverIterationsPostUpdate

◆ PhysicsBodyDefinitions

TArray< FAnimPhysBodyDefinition > FAnimNode_AnimDynamics::PhysicsBodyDefinitions

◆ PlanarLimits

TArray<FAnimPhysPlanarLimit> FAnimNode_AnimDynamics::PlanarLimits

List of available planar limits for this node

◆ PreviousActorWorldSpaceTM

FTransform FAnimNode_AnimDynamics::PreviousActorWorldSpaceTM

◆ PreviousCompWorldSpaceTM

FTransform FAnimNode_AnimDynamics::PreviousCompWorldSpaceTM

◆ PreviousSimSpaceTM

FTransform FAnimNode_AnimDynamics::PreviousSimSpaceTM

◆ RelativeSpaceBone

FBoneReference FAnimNode_AnimDynamics::RelativeSpaceBone

When in BoneRelative sim space, the simulation will use this bone as the origin

◆ RetargetingSettings

FRotationRetargetingInfo FAnimNode_AnimDynamics::RetargetingSettings

The settings for rotation retargeting

◆ SimSpaceSettings

FAnimPhysSimSpaceSettings FAnimNode_AnimDynamics::SimSpaceSettings

Settings for the system which passes motion of the simulation's space into the simulation. This allows the simulation to pass a fraction of the world space motion onto the bodies which allows Bone-Space and Component-Space simulations to react to world-space movement in a controllable way. This system is a superset of the functionality provided by ComponentLinearAccScale, ComponentLinearVelScale, and ComponentAppliedLinearAccClamp. In general you should not have both systems enabled.

◆ SimulationSpace

AnimPhysSimSpaceType FAnimNode_AnimDynamics::SimulationSpace

The space used to run the simulation

◆ SphericalLimits

TArray<FAnimPhysSphericalLimit> FAnimNode_AnimDynamics::SphericalLimits

List of available spherical limits for this node

◆ WindScale

float FAnimNode_AnimDynamics::WindScale

Scale to apply to calculated wind velocities in the solver


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