a.AnimNode.Inertialization.Enable
a.AnimNode.Inertialization.Enable
#Overview
name: a.AnimNode.Inertialization.Enable
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Enable / Disable Inertialization
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of a.AnimNode.Inertialization.Enable is to control the enabling or disabling of the Inertialization feature in Unreal Engine’s animation system.
- This setting variable is primarily used by the animation system in Unreal Engine 5.
- The Animation module within the Engine subsystem relies on this setting variable, as evidenced by its location in the “AnimNode_Inertialization.cpp” file.
- The value of this variable is set as a console variable with a default value of 1 (enabled). It can be changed at runtime through the console or programmatically.
- This variable interacts with the associated C++ variable CVarAnimInertializationEnable, which is used to query the current state of the setting.
- Developers must be aware that disabling this variable will turn off the Inertialization feature, which may affect the smoothness of animation transitions.
- Best practices when using this variable include:
- Only disable it for testing or debugging purposes.
- Be cautious when changing its value during gameplay, as it may cause sudden changes in animation behavior.
Regarding the associated variable CVarAnimInertializationEnable:
- Its purpose is to provide a programmatic way to access the a.AnimNode.Inertialization.Enable setting within the C++ code.
- It is used directly in the Animation module of the Engine subsystem.
- The value is set when the console variable is created and can be queried using the GetValueOnAnyThread() method.
- It interacts with the animation system by controlling whether Inertialization requests are processed or cleared.
- Developers should be aware that this variable is checked during the Evaluate_AnyThread function of the FAnimNode_Inertialization class, which is a critical part of the animation update process.
- Best practices for using this variable include:
- Use GetValueOnAnyThread() when querying the value to ensure thread-safe access.
- Consider the performance implications of frequently checking this value in performance-critical code paths.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Animation/AnimNode_Inertialization.cpp:22
Scope: file
Source code excerpt:
const FName UE::Anim::IInertializationRequester::Attribute("InertialBlending");
TAutoConsoleVariable<int32> CVarAnimInertializationEnable(TEXT("a.AnimNode.Inertialization.Enable"), 1, TEXT("Enable / Disable Inertialization"));
TAutoConsoleVariable<int32> CVarAnimInertializationIgnoreVelocity(TEXT("a.AnimNode.Inertialization.IgnoreVelocity"), 0, TEXT("Ignore velocity information during Inertialization (effectively reverting to a quintic diff blend)"));
TAutoConsoleVariable<int32> CVarAnimInertializationIgnoreDeficit(TEXT("a.AnimNode.Inertialization.IgnoreDeficit"), 0, TEXT("Ignore inertialization time deficit caused by interruptions"));
namespace UE::Anim
{
#Associated Variable and Callsites
This variable is associated with another variable named CVarAnimInertializationEnable
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Animation/AnimNode_Inertialization.cpp:22
Scope: file
Source code excerpt:
const FName UE::Anim::IInertializationRequester::Attribute("InertialBlending");
TAutoConsoleVariable<int32> CVarAnimInertializationEnable(TEXT("a.AnimNode.Inertialization.Enable"), 1, TEXT("Enable / Disable Inertialization"));
TAutoConsoleVariable<int32> CVarAnimInertializationIgnoreVelocity(TEXT("a.AnimNode.Inertialization.IgnoreVelocity"), 0, TEXT("Ignore velocity information during Inertialization (effectively reverting to a quintic diff blend)"));
TAutoConsoleVariable<int32> CVarAnimInertializationIgnoreDeficit(TEXT("a.AnimNode.Inertialization.IgnoreDeficit"), 0, TEXT("Ignore inertialization time deficit caused by interruptions"));
namespace UE::Anim
{
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Animation/AnimNode_Inertialization.cpp:441
Scope (from outer to inner):
file
function void FAnimNode_Inertialization::Evaluate_AnyThread
Source code excerpt:
// Disable inertialization if requested (for testing / debugging)
if (!CVarAnimInertializationEnable.GetValueOnAnyThread())
{
// Clear any pending inertialization requests
RequestQueue.Reset();
// Clear the inertialization state
Deactivate();