Navigation
API > API/Runtime > API/Runtime/AnimGraphRuntime > API/Runtime/AnimGraphRuntime/BoneControllers
Inheritance Hierarchy
- FAnimNode_Base
- FAnimNode_SkeletalControlBase
- FAnimNode_AnimDynamics
References
| Module | AnimGraphRuntime |
| Header | /Engine/Source/Runtime/AnimGraphRuntime/Public/BoneControllers/AnimNode_AnimDynamics.h |
| Include | #include "BoneControllers/AnimNode_AnimDynamics.h" |
Syntax
struct FAnimNode_AnimDynamics : public FAnimNode_SkeletalControlBase
Variables
| Type | Name | Description | |
|---|---|---|---|
| float | 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. | |
| float | AngularDampingOverride | Overridden angular damping value. The default is 0.7. Values below 0.7 won't have an effect. | |
| float | AngularSpringConstant | Spring constant to use when calculating angular springs, higher values mean a stronger spring. | |
| uint8: 1 | bAngularSpring | If true the body will attempt to align itself with the specified angular target | |
| uint8: 1 | bChain | Set to true to use the solver to simulate a connected chain | |
| uint8: 1 | bDoEval | If true we will perform bone transform evaluation, otherwise skip - allows visualization of the initial anim state compared to the physics sim | |
| bool | bDoPhysicsUpdateInEditor | 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. | |
| uint8: 1 | bDoUpdate | If true we will perform physics update, otherwise skip - allows visualization of the initial state of the bodies | |
| uint8: 1 | bEnableWind | Whether or not wind is enabled for the bodies in this simulation | |
| uint8: 1 | bGravityOverrideInSimSpace | If true the gravity override value is defined in simulation space, by default it is in world space | |
| uint8: 1 | bLinearSpring | If true the body will attempt to spring back to its initial position | |
| FBoneReference | BoundBone | The bone to attach the physics body to, if bChain is true this is the top of the chain | |
| uint8: 1 | bOverrideAngularBias | If true, the override value will be used for the angular bias for bodies in this node. | |
| uint8: 1 | bOverrideAngularDamping | If true, the override value will be used for angular damping | |
| uint8: 1 | bOverrideLinearDamping | If true, the override value will be used for linear damping | |
| uint8: 1 | bUseGravityOverride | Use gravity override value vs gravity scale | |
| uint8: 1 | bUsePlanarLimit | Whether to evaluate planar limits | |
| uint8: 1 | bUseSphericalLimits | Whether to evaluate spherical limits | |
| uint8: 1 | bWindWasEnabled | ||
| FBoneReference | ChainEnd | If bChain is true this is the bottom of the chain, otherwise ignored | |
| FVector | 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. | |
| FVector | 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. | |
| FVector | 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. | |
| FVector | ExternalForce | An external force to apply to all bodies in the simulation when ticked, specified in world space | |
| FVector | GravityOverride | Gravity Override Value | |
| float | GravityScale | Scale for gravity, higher values increase forces due to gravity | |
| ETeleportType | InitTeleportType | We can't get clean bone positions unless we are in the evaluate step. | |
| AnimPhysSimSpaceType | LastSimSpace | Cached sim space that we last used. | |
| float | LinearDampingOverride | Overridden linear damping value. The default is 0.7. Values below 0.7 won't have an effect. | |
| float | LinearSpringConstant | Spring constant to use when calculating linear springs, higher values mean a stronger spring. | |
| int32 | 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 | |
| int32 | 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 | |
| TArray< FAnimPhysBodyDefinition > | PhysicsBodyDefinitions | ||
| TArray< FAnimPhysPlanarLimit > | PlanarLimits | List of available planar limits for this node | |
| FTransform | PreviousActorWorldSpaceTM | ||
| FTransform | PreviousCompWorldSpaceTM | Previous component & actor transforms, used to account for teleports. | |
| FBoneReference | RelativeSpaceBone | When in BoneRelative sim space, the simulation will use this bone as the origin | |
| FRotationRetargetingInfo | RetargetingSettings | The settings for rotation retargeting | |
| AnimPhysSimSpaceType | SimulationSpace | The space used to run the simulation | |
| TArray< FAnimPhysSphericalLimit > | SphericalLimits | List of available spherical limits for this node | |
| float | WindScale | Scale to apply to calculated wind velocities in the solver |
Constructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | FindChainBoneNames
(
const FReferenceSkeleton& ReferenceSkeleton, |
||
| FTransform | GetBodyComponentSpaceTransform
(
const FAnimPhysRigidBody& Body, |
||
| FVector | GetBodyLocalJointOffset
(
const int32 BodyIndex |
Accessors for editor code (mainly for visualization functions) | |
| int32 | GetNumBodies () |
||
| const FAnimPhysRigidBody & | GetPhysBody
(
int32 BodyIndex |
||
| void | InitPhysics
(
FComponentSpacePoseContext& Output |
||
| bool | IsAnimDynamicsSystemEnabledFor
(
int32 InLOD |
||
| void | RequestInitialise
(
ETeleportType InTeleportType |
||
| bool | |||
| void | TermPhysics () |
||
| void | UpdateChainPhysicsBodyDefinitions
(
const FReferenceSkeleton& ReferenceSkeleton |
||
| void | UpdateLimits
(
FComponentSpacePoseContext& Output |
||
| void | ValidateChainPhysicsBodyDefinitions
(
const FReferenceSkeleton& ReferenceSkeleton |
Overridden from FAnimNode_SkeletalControlBase
| Type | Name | Description | |
|---|---|---|---|
| void | EvaluateSkeletalControl_AnyThread
(
FComponentSpacePoseContext& Output, |
Evaluate the new component-space transforms for the affected bones. | |
| void | InitializeBoneReferences
(
const FBoneContainer& RequiredBones |
Initialize any bone references you have | |
| bool | IsValidToEvaluate
(
const USkeleton* Skeleton, |
Return true if it is valid to Evaluate | |
| void | UpdateInternal
(
const FAnimationUpdateContext& Context |
Interface for derived skeletal controls to implement use this function to update for skeletal control base |
Overridden from FAnimNode_Base
| Type | Name | Description | |
|---|---|---|---|
| void | GatherDebugData
(
FNodeDebugData& DebugData |
Called to gather on-screen debug data. This is called on the game thread. | |
| int32 | Get the LOD threshold at which this node is enabled. | ||
| bool | HasPreUpdate () |
Override this to indicate that PreUpdate() should be called on the game thread (usually to gather non-thread safe data) before Update() is called. | |
| void | Initialize_AnyThread
(
const FAnimationInitializeContext& Context |
Called when the node first runs. | |
| bool | For nodes that implement some kind of simulation, return true here so ResetDynamics() gets called when things like teleports, time skips etc. | ||
| void | PreUpdate
(
const UAnimInstance* InAnimInstance |
Override this to perform game-thread work prior to non-game thread Update() being called | |
| void | ResetDynamics
(
ETeleportType InTeleportType |
Called to help dynamics-based updates to recover correctly from large movements/teleports |
Constants
| Name | Description |
|---|---|
| MaxTimeDebt | Maximum time to consider when accumulating time debt to avoid spiraling. |
Deprecated Variables
| Type | Name | Description | |
|---|---|---|---|
| FVector | BoxExtents_DEPRECATED | ||
| AnimPhysCollisionType | CollisionType_DEPRECATED | ||
| FAnimPhysConstraintSetup | ConstraintSetup_DEPRECATED | ||
| FVector | LocalJointOffset_DEPRECATED | ||
| float | SphereCollisionRadius_DEPRECATED |