Navigation
API > API/Runtime > API/Runtime/AnimGraphRuntime
| Name | FAnimNode_AnimDynamics |
| Type | struct |
| Header File | /Engine/Source/Runtime/AnimGraphRuntime/Public/BoneControllers/AnimNode_AnimDynamics.h |
| Include Path | #include "BoneControllers/AnimNode_AnimDynamics.h" |
Syntax
USTRUCT (BlueprintInternalUseOnly)
struct FAnimNode_AnimDynamics : public FAnimNode_SkeletalControlBase
Inheritance Hierarchy
- FAnimNode_Base → FAnimNode_SkeletalControlBase → FAnimNode_AnimDynamics
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FAnimNode_AnimDynamics() |
BoneControllers/AnimNode_AnimDynamics.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| MaxTimeDebt | const float | Maximum time to consider when accumulating time debt to avoid spiraling. | BoneControllers/AnimNode_AnimDynamics.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AngularBiasOverride | float | 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. | BoneControllers/AnimNode_AnimDynamics.h |
|
| AngularDampingOverride | float | Overridden angular damping value. The default is 0.7. Values below 0.7 won't have an effect. | BoneControllers/AnimNode_AnimDynamics.h |
|
| AngularSpringConstant | float | Spring constant to use when calculating angular springs, higher values mean a stronger spring. | BoneControllers/AnimNode_AnimDynamics.h |
|
| bAngularSpring | uint8 | If true the body will attempt to align itself with the specified angular target | BoneControllers/AnimNode_AnimDynamics.h |
|
| bChain | uint8 | Set to true to use the solver to simulate a connected chain | BoneControllers/AnimNode_AnimDynamics.h |
|
| bDoEval | uint8 | If true we will perform bone transform evaluation, otherwise skip - allows visualization of the initial anim state compared to the physics sim | BoneControllers/AnimNode_AnimDynamics.h |
|
| bDoPhysicsUpdateInEditor | bool | True by default, if false physics simulation will not update this frame. Used to prevent the rig moving whilst interactively editing parameters with a widget in the viewport. | BoneControllers/AnimNode_AnimDynamics.h | |
| bDoUpdate | uint8 | If true we will perform physics update, otherwise skip - allows visualization of the initial state of the bodies | BoneControllers/AnimNode_AnimDynamics.h |
|
| bEnableWind | uint8 | Whether or not wind is enabled for the bodies in this simulation | BoneControllers/AnimNode_AnimDynamics.h |
|
| bGravityOverrideInSimSpace | uint8 | If true the gravity override value is defined in simulation space, by default it is in world space | BoneControllers/AnimNode_AnimDynamics.h |
|
| bLinearSpring | uint8 | If true the body will attempt to spring back to its initial position | BoneControllers/AnimNode_AnimDynamics.h |
|
| BoundBone | FBoneReference | The bone to attach the physics body to, if bChain is true this is the top of the chain | BoneControllers/AnimNode_AnimDynamics.h |
|
| bOverrideAngularBias | uint8 | If true, the override value will be used for the angular bias for bodies in this node. | BoneControllers/AnimNode_AnimDynamics.h |
|
| bOverrideAngularDamping | uint8 | If true, the override value will be used for angular damping | BoneControllers/AnimNode_AnimDynamics.h |
|
| bOverrideLinearDamping | uint8 | If true, the override value will be used for linear damping | BoneControllers/AnimNode_AnimDynamics.h |
|
| bUseGravityOverride | uint8 | Use gravity override value vs gravity scale | BoneControllers/AnimNode_AnimDynamics.h |
|
| bUsePlanarLimit | uint8 | Whether to evaluate planar limits | BoneControllers/AnimNode_AnimDynamics.h |
|
| bUseSphericalLimits | uint8 | Whether to evaluate spherical limits | BoneControllers/AnimNode_AnimDynamics.h |
|
| bWindWasEnabled | uint8 | BoneControllers/AnimNode_AnimDynamics.h | ||
| ChainEnd | FBoneReference | If bChain is true this is the bottom of the chain, otherwise ignored | BoneControllers/AnimNode_AnimDynamics.h |
|
| ComponentAppliedLinearAccClamp | FVector | 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. | BoneControllers/AnimNode_AnimDynamics.h |
|
| ComponentLinearAccScale | FVector | When using non-world-space sim, this controls how much of the components world-space acceleration is passed on to the local-space simulation. | BoneControllers/AnimNode_AnimDynamics.h |
|
| ComponentLinearVelScale | FVector | 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. | BoneControllers/AnimNode_AnimDynamics.h |
|
| ExternalForce | FVector | An external force to apply to all bodies in the simulation when ticked, specified in world space | BoneControllers/AnimNode_AnimDynamics.h |
|
| GravityOverride | FVector | Gravity Override Value | BoneControllers/AnimNode_AnimDynamics.h |
|
| GravityScale | float | Scale for gravity, higher values increase forces due to gravity | BoneControllers/AnimNode_AnimDynamics.h |
|
| InitTeleportType | ETeleportType | We can't get clean bone positions unless we are in the evaluate step. | BoneControllers/AnimNode_AnimDynamics.h | |
| LastSimSpace | AnimPhysSimSpaceType | Cached sim space that we last used. | BoneControllers/AnimNode_AnimDynamics.h | |
| LinearDampingOverride | float | Overridden linear damping value. The default is 0.7. Values below 0.7 won't have an effect. | BoneControllers/AnimNode_AnimDynamics.h |
|
| LinearSpringConstant | float | Spring constant to use when calculating linear springs, higher values mean a stronger spring. | BoneControllers/AnimNode_AnimDynamics.h |
|
| NumSolverIterationsPostUpdate | int32 | 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 | BoneControllers/AnimNode_AnimDynamics.h |
|
| NumSolverIterationsPreUpdate | int32 | 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 | BoneControllers/AnimNode_AnimDynamics.h |
|
| PhysicsBodyDefinitions | TArray< FAnimPhysBodyDefinition > | BoneControllers/AnimNode_AnimDynamics.h |
|
|
| PlanarLimits | TArray< FAnimPhysPlanarLimit > | List of available planar limits for this node | BoneControllers/AnimNode_AnimDynamics.h |
|
| PreviousActorWorldSpaceTM | FTransform | BoneControllers/AnimNode_AnimDynamics.h | ||
| PreviousCompWorldSpaceTM | FTransform | Previous component & actor transforms, used to account for teleports. | BoneControllers/AnimNode_AnimDynamics.h | |
| PreviousSimSpaceTM | FTransform | BoneControllers/AnimNode_AnimDynamics.h | ||
| RelativeSpaceBone | FBoneReference | When in BoneRelative sim space, the simulation will use this bone as the origin | BoneControllers/AnimNode_AnimDynamics.h |
|
| RetargetingSettings | FRotationRetargetingInfo | The settings for rotation retargeting | BoneControllers/AnimNode_AnimDynamics.h |
|
| SimSpaceSettings | FAnimPhysSimSpaceSettings | Settings for the system which passes motion of the simulation's space into the simulation. | BoneControllers/AnimNode_AnimDynamics.h |
|
| SimulationSpace | AnimPhysSimSpaceType | The space used to run the simulation | BoneControllers/AnimNode_AnimDynamics.h |
|
| SphericalLimits | TArray< FAnimPhysSphericalLimit > | List of available spherical limits for this node | BoneControllers/AnimNode_AnimDynamics.h |
|
| WindScale | float | Scale to apply to calculated wind velocities in the solver | BoneControllers/AnimNode_AnimDynamics.h |
|
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ActiveBoneIndices | TArray< int32 > | Depending on the LOD we might not be running all of the bound bodies (for chains) this tracks the active bodies. | BoneControllers/AnimNode_AnimDynamics.h | |
| AngularLimits | TArray< FAnimPhysAngularLimit > | List of current angular limits built for the current frame. | BoneControllers/AnimNode_AnimDynamics.h | |
| AnimPhysicsMinDeltaTime | float | Cached physics settings. We cache these on initialise to avoid the cost of accessing UPhysicsSettings a lot each frame. | BoneControllers/AnimNode_AnimDynamics.h | |
| BaseBodyPtrs | TArray< FAnimPhysRigidBody * > | Pointers back to the base bodies to pass to the simulation. | BoneControllers/AnimNode_AnimDynamics.h | |
| Bodies | TArray< FAnimPhysLinkedBody > | Active body list. | BoneControllers/AnimNode_AnimDynamics.h | |
| BodiesToReset | TArray< FAnimPhysLinkedBody * > | Pointers to bodies that need to be reset to their bound bone. | BoneControllers/AnimNode_AnimDynamics.h | |
| ConstraintOffsets | TArray< FAnimConstraintOffsetPair > | A pair of positions (relative to their associated physics bodies) for each pair of bodies in a chain. These positions should be driven to match each other in sim space by the physics contstraints - See UpdateLimits() fns. | BoneControllers/AnimNode_AnimDynamics.h | |
| FilteredBoneIndex | int32 | BoneControllers/AnimNode_AnimDynamics.h | ||
| LinearLimits | TArray< FAnimPhysLinearLimit > | List of current linear limits built for the current frame. | BoneControllers/AnimNode_AnimDynamics.h | |
| MaxPhysicsDeltaTime | float | BoneControllers/AnimNode_AnimDynamics.h | ||
| MaxSubstepDeltaTime | float | BoneControllers/AnimNode_AnimDynamics.h | ||
| MaxSubsteps | int32 | BoneControllers/AnimNode_AnimDynamics.h | ||
| NextTimeStep | float | Cached timestep from the update phase (needed in evaluate phase) | BoneControllers/AnimNode_AnimDynamics.h | |
| PhysicsBodyJointOffsets | TArray< FVector > | Position of the physics object relative to the transform if its bound bone. | BoneControllers/AnimNode_AnimDynamics.h | |
| PreviousComponentLinearVelocity | FVector | Previous linear velocity to resolve world accelerations when not using world space simulation. | BoneControllers/AnimNode_AnimDynamics.h | |
| PreviousSimSpaceAngularVelocity | FVector | Previous angular velocity to resolve world angular acceleration when not using world space simulation. | BoneControllers/AnimNode_AnimDynamics.h | |
| SimSpaceGravityDirection | FVector | Gravity direction in sim space. | BoneControllers/AnimNode_AnimDynamics.h | |
| Springs | TArray< FAnimPhysSpring > | List of spring force generators created for this frame. | BoneControllers/AnimNode_AnimDynamics.h | |
| TimeDebt | float | Current amount of time debt. | BoneControllers/AnimNode_AnimDynamics.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void FindChainBoneNames
(
const FReferenceSkeleton& ReferenceSkeleton, |
BoneControllers/AnimNode_AnimDynamics.h | ||
FTransform GetBodyComponentSpaceTransform
(
const FAnimPhysRigidBody& Body, |
BoneControllers/AnimNode_AnimDynamics.h | ||
FVector GetBodyLocalJointOffset
(
const int32 BodyIndex |
Accessors for editor code (mainly for visualization functions) | BoneControllers/AnimNode_AnimDynamics.h | |
int32 GetNumBodies() |
BoneControllers/AnimNode_AnimDynamics.h | ||
const FAnimPhysRigidBody & GetPhysBody
(
int32 BodyIndex |
BoneControllers/AnimNode_AnimDynamics.h | ||
void InitPhysics
(
FComponentSpacePoseContext& Output |
BoneControllers/AnimNode_AnimDynamics.h | ||
void RequestInitialise
(
ETeleportType InTeleportType |
BoneControllers/AnimNode_AnimDynamics.h | ||
bool ShouldDoPhysicsUpdate() |
BoneControllers/AnimNode_AnimDynamics.h | ||
void TermPhysics() |
BoneControllers/AnimNode_AnimDynamics.h | ||
void UpdateChainPhysicsBodyDefinitions
(
const FReferenceSkeleton& ReferenceSkeleton |
BoneControllers/AnimNode_AnimDynamics.h | ||
void UpdateLimits
(
FComponentSpacePoseContext& Output |
BoneControllers/AnimNode_AnimDynamics.h | ||
void ValidateChainPhysicsBodyDefinitions
(
const FReferenceSkeleton& ReferenceSkeleton |
BoneControllers/AnimNode_AnimDynamics.h |
Overridden from FAnimNode_SkeletalControlBase
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void EvaluateSkeletalControl_AnyThread
(
FComponentSpacePoseContext& Output, |
Evaluate the new component-space transforms for the affected bones. | BoneControllers/AnimNode_AnimDynamics.h | |
virtual void UpdateInternal
(
const FAnimationUpdateContext& Context |
Interface for derived skeletal controls to implement use this function to update for skeletal control base | BoneControllers/AnimNode_AnimDynamics.h |
Overridden from FAnimNode_Base
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void GatherDebugData
(
FNodeDebugData& DebugData |
BoneControllers/AnimNode_AnimDynamics.h | ||
virtual int32 GetLODThreshold() |
BoneControllers/AnimNode_AnimDynamics.h | ||
virtual bool HasPreUpdate() |
BoneControllers/AnimNode_AnimDynamics.h | ||
virtual void Initialize_AnyThread
(
const FAnimationInitializeContext& Context |
BoneControllers/AnimNode_AnimDynamics.h | ||
virtual bool NeedsDynamicReset() |
BoneControllers/AnimNode_AnimDynamics.h | ||
virtual void PreUpdate
(
const UAnimInstance* InAnimInstance |
BoneControllers/AnimNode_AnimDynamics.h | ||
virtual void ResetDynamics
(
ETeleportType InTeleportType |
BoneControllers/AnimNode_AnimDynamics.h |
Protected
Overridden from FAnimNode_SkeletalControlBase
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void InitializeBoneReferences
(
const FBoneContainer& RequiredBones |
Initialize any bone references you have | BoneControllers/AnimNode_AnimDynamics.h | |
virtual bool IsValidToEvaluate
(
const USkeleton* Skeleton, |
Return true if it is valid to Evaluate | BoneControllers/AnimNode_AnimDynamics.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static bool IsAnimDynamicsSystemEnabledFor
(
int32 InLOD |
BoneControllers/AnimNode_AnimDynamics.h |
Deprecated Variables
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| BoxExtents_DEPRECATED | FVector | BoneControllers/AnimNode_AnimDynamics.h | ||
| CollisionType_DEPRECATED | AnimPhysCollisionType | BoneControllers/AnimNode_AnimDynamics.h | ||
| ConstraintSetup_DEPRECATED | FAnimPhysConstraintSetup | BoneControllers/AnimNode_AnimDynamics.h | ||
| LocalJointOffset_DEPRECATED | FVector | BoneControllers/AnimNode_AnimDynamics.h | ||
| SphereCollisionRadius_DEPRECATED | float | BoneControllers/AnimNode_AnimDynamics.h |