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

#include <AnimNode_RigidBody.h>

+ Inheritance diagram for FAnimNode_RigidBody:

Public Member Functions

ANIMGRAPHRUNTIME_API FAnimNode_RigidBody ()
 
ANIMGRAPHRUNTIME_API ~FAnimNode_RigidBody ()
 
virtual ANIMGRAPHRUNTIME_API void GatherDebugData (FNodeDebugData &DebugData) override
 
virtual ANIMGRAPHRUNTIME_API void Initialize_AnyThread (const FAnimationInitializeContext &Context) override
 
virtual ANIMGRAPHRUNTIME_API void UpdateComponentPose_AnyThread (const FAnimationUpdateContext &Context) override
 
virtual ANIMGRAPHRUNTIME_API void EvaluateComponentPose_AnyThread (FComponentSpacePoseContext &Output) override
 
virtual ANIMGRAPHRUNTIME_API void EvaluateSkeletalControl_AnyThread (FComponentSpacePoseContext &Output, TArray< FBoneTransform > &OutBoneTransforms) override
 
virtual ANIMGRAPHRUNTIME_API void OnInitializeAnimInstance (const FAnimInstanceProxy *InProxy, const UAnimInstance *InAnimInstance) override
 
virtual bool NeedsOnInitializeAnimInstance () const override
 
virtual ANIMGRAPHRUNTIME_API void PreUpdate (const UAnimInstance *InAnimInstance) override
 
virtual ANIMGRAPHRUNTIME_API void UpdateInternal (const FAnimationUpdateContext &Context) override
 
virtual bool HasPreUpdate () const override
 
virtual ANIMGRAPHRUNTIME_API bool IsValidToEvaluate (const USkeleton *Skeleton, const FBoneContainer &RequiredBones) override
 
virtual ANIMGRAPHRUNTIME_API bool NeedsDynamicReset () const override
 
virtual ANIMGRAPHRUNTIME_API void ResetDynamics (ETeleportType InTeleportType) override
 
virtual ANIMGRAPHRUNTIME_API int32 GetLODThreshold () const override
 
virtual ANIMGRAPHRUNTIME_API void AddImpulseAtLocation (FVector Impulse, FVector Location, FName BoneName=NAME_None)
 
virtual ImmediatePhysics::FSimulationGetSimulation ()
 
void SetOverridePhysicsAsset (UPhysicsAsset *PhysicsAsset)
 
UPhysicsAssetGetPhysicsAsset () const
 
ANIMGRAPHRUNTIME_API void PostSerialize (const FArchive &Ar)
 
- 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 ~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

TObjectPtr< UPhysicsAssetOverridePhysicsAsset
 
bool bDefaultToSkeletalMeshPhysicsAsset = true
 
bool bUseDefaultAsSimulated = false
 
bool bUseLocalLODThresholdOnly = false
 
FVector OverrideWorldGravity
 
FVector ExternalForce
 
FVector ComponentLinearAccScale
 
FVector ComponentLinearVelScale
 
FVector ComponentAppliedLinearAccClamp
 
FSimSpaceSettings SimSpaceSettings
 
float CachedBoundsScale
 
FBoneReference BaseBoneRef
 
TEnumAsByte< ECollisionChannelOverlapChannel
 
ESimulationSpace SimulationSpace
 
bool bForceDisableCollisionBetweenConstraintBodies
 
bool bUseExternalClothCollision
 
uint8 bEnableWorldGeometry: 1
 
uint8 bOverrideWorldGravity: 1
 
uint8 bTransferBoneVelocities: 1
 
uint8 bFreezeIncomingPoseOnStart: 1
 
uint8 bClampLinearTranslationLimitToRefPose: 1
 
float WorldSpaceMinimumScale
 
float EvaluationResetTime
 
ESimulationTiming SimulationTiming
 
- 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
 

Friends

class FRigidBodyNodeSimulationTask
 

Additional Inherited Members

- Protected Member Functions inherited from FAnimNode_SkeletalControlBase
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)
 

Detailed Description

Controller that simulates physics based on the physics asset of the skeletal mesh component

Constructor & Destructor Documentation

◆ FAnimNode_RigidBody()

FAnimNode_RigidBody::FAnimNode_RigidBody ( )

◆ ~FAnimNode_RigidBody()

FAnimNode_RigidBody::~FAnimNode_RigidBody ( )

Member Function Documentation

◆ AddImpulseAtLocation()

void FAnimNode_RigidBody::AddImpulseAtLocation ( FVector  Impulse,
FVector  Location,
FName  BoneName = NAME_None 
)
virtual

◆ EvaluateComponentPose_AnyThread()

void FAnimNode_RigidBody::EvaluateComponentPose_AnyThread ( FComponentSpacePoseContext Output)
overridevirtual

Reimplemented from FAnimNode_SkeletalControlBase.

◆ EvaluateSkeletalControl_AnyThread()

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

Reimplemented from FAnimNode_SkeletalControlBase.

◆ GatherDebugData()

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

◆ GetLODThreshold()

int32 FAnimNode_RigidBody::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.

◆ GetPhysicsAsset()

UPhysicsAsset * FAnimNode_RigidBody::GetPhysicsAsset ( ) const
inline

◆ GetSimulation()

virtual ImmediatePhysics::FSimulation * FAnimNode_RigidBody::GetSimulation ( )
inlinevirtual

◆ HasPreUpdate()

virtual bool FAnimNode_RigidBody::HasPreUpdate ( ) const
inlineoverridevirtual

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_RigidBody::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_RigidBody::IsValidToEvaluate ( const USkeleton Skeleton,
const FBoneContainer RequiredBones 
)
overridevirtual

Reimplemented from FAnimNode_SkeletalControlBase.

◆ NeedsDynamicReset()

bool FAnimNode_RigidBody::NeedsDynamicReset ( ) const
overridevirtual

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.

◆ NeedsOnInitializeAnimInstance()

virtual bool FAnimNode_RigidBody::NeedsOnInitializeAnimInstance ( ) const
inlineoverridevirtual

For nodes that need some kind of initialization that is not dependent on node relevancy (i.e. it is insufficient or inefficient to use Initialize_AnyThread), return true here. Note that this is called at load on the UAnimInstance CDO to avoid needing to call this at runtime.

Reimplemented from FAnimNode_Base.

◆ OnInitializeAnimInstance()

void FAnimNode_RigidBody::OnInitializeAnimInstance ( const FAnimInstanceProxy InProxy,
const UAnimInstance InAnimInstance 
)
overridevirtual

Called once, from game thread as the parent anim instance is created

Reimplemented from FAnimNode_Base.

◆ PostSerialize()

ANIMGRAPHRUNTIME_API void FAnimNode_RigidBody::PostSerialize ( const FArchive Ar)

◆ PreUpdate()

void FAnimNode_RigidBody::PreUpdate ( const UAnimInstance InAnimInstance)
overridevirtual

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

Reimplemented from FAnimNode_Base.

◆ ResetDynamics()

void FAnimNode_RigidBody::ResetDynamics ( ETeleportType  InTeleportType)
overridevirtual

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

Reimplemented from FAnimNode_Base.

◆ SetOverridePhysicsAsset()

void FAnimNode_RigidBody::SetOverridePhysicsAsset ( UPhysicsAsset PhysicsAsset)

Set the override physics asset. This will automatically trigger a physics re-init in case the override physics asset changes. Users can get access to this in the Animation Blueprint via the Animation Node Functions.

◆ UpdateComponentPose_AnyThread()

void FAnimNode_RigidBody::UpdateComponentPose_AnyThread ( const FAnimationUpdateContext Context)
overridevirtual

Reimplemented from FAnimNode_SkeletalControlBase.

◆ UpdateInternal()

void FAnimNode_RigidBody::UpdateInternal ( const FAnimationUpdateContext Context)
overridevirtual

Reimplemented from FAnimNode_SkeletalControlBase.

Friends And Related Symbol Documentation

◆ FRigidBodyNodeSimulationTask

friend class FRigidBodyNodeSimulationTask
friend

Member Data Documentation

◆ BaseBoneRef

FBoneReference FAnimNode_RigidBody::BaseBoneRef

Matters if SimulationSpace is BaseBone

◆ bClampLinearTranslationLimitToRefPose

uint8 FAnimNode_RigidBody::bClampLinearTranslationLimitToRefPose

Correct for linear tearing on bodies with all axes Locked. This only works if all axes linear translation are locked

◆ bDefaultToSkeletalMeshPhysicsAsset

bool FAnimNode_RigidBody::bDefaultToSkeletalMeshPhysicsAsset = true

Use the skeletal mesh physics asset as default in case set to True. The Override Physics Asset will always have priority over this.

◆ bEnableWorldGeometry

uint8 FAnimNode_RigidBody::bEnableWorldGeometry

◆ bForceDisableCollisionBetweenConstraintBodies

bool FAnimNode_RigidBody::bForceDisableCollisionBetweenConstraintBodies

Whether to allow collisions between two bodies joined by a constraint

◆ bFreezeIncomingPoseOnStart

uint8 FAnimNode_RigidBody::bFreezeIncomingPoseOnStart

When simulation starts, freeze incoming pose. This is useful for ragdolls, when we want the simulation to take over. It prevents non simulated bones from animating.

◆ bOverrideWorldGravity

uint8 FAnimNode_RigidBody::bOverrideWorldGravity

◆ bTransferBoneVelocities

uint8 FAnimNode_RigidBody::bTransferBoneVelocities

When simulation starts, transfer previous bone velocities (from animation) to make transition into simulation seamless.

◆ bUseDefaultAsSimulated

bool FAnimNode_RigidBody::bUseDefaultAsSimulated = false

Treat parts in the Physics Asset with PhysicsType Default as Simulated for RBAN.

◆ bUseExternalClothCollision

bool FAnimNode_RigidBody::bUseExternalClothCollision

If true, kinematic objects will be added to the simulation at runtime to represent any cloth colliders defined for the parent object.

◆ bUseLocalLODThresholdOnly

bool FAnimNode_RigidBody::bUseLocalLODThresholdOnly = false

Enable if you want to ignore the p.RigidBodyLODThreshold CVAR and force the node to solely use the LOD threshold.

◆ CachedBoundsScale

float FAnimNode_RigidBody::CachedBoundsScale

Scale of cached bounds (vs. actual bounds). Increasing this may improve performance, but overlaps may not work as well. (A value of 1.0 effectively disables cached bounds).

◆ ComponentAppliedLinearAccClamp

FVector FAnimNode_RigidBody::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_RigidBody::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_RigidBody::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.

◆ EvaluationResetTime

float FAnimNode_RigidBody::EvaluationResetTime

If the node is not evaluated for this amount of time (seconds), either because a lower LOD was in use for a while or the component was not visible, reset the simulation to the default pose on the next evaluation. Set to 0 to disable time-based reset.

◆ ExternalForce

FVector FAnimNode_RigidBody::ExternalForce

Applies a uniform external force in world space. This allows for easily faking inertia of movement while still simulating in component space for example

◆ OverlapChannel

TEnumAsByte<ECollisionChannel> FAnimNode_RigidBody::OverlapChannel

The channel we use to find static geometry to collide with

◆ OverridePhysicsAsset

TObjectPtr<UPhysicsAsset> FAnimNode_RigidBody::OverridePhysicsAsset

Physics asset to use. If empty use the skeletal mesh's default physics asset in case Default To Skeletal Mesh Physics Asset is set to True.

◆ OverrideWorldGravity

FVector FAnimNode_RigidBody::OverrideWorldGravity

Override gravity

◆ SimSpaceSettings

FSimSpaceSettings FAnimNode_RigidBody::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

ESimulationSpace FAnimNode_RigidBody::SimulationSpace

What space to simulate the bodies in. This affects how velocities are generated

◆ SimulationTiming

ESimulationTiming FAnimNode_RigidBody::SimulationTiming

◆ WorldSpaceMinimumScale

float FAnimNode_RigidBody::WorldSpaceMinimumScale

For world-space simulations, if the magnitude of the component's 3D scale is less than WorldSpaceMinimumScale, do not update the node.


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