a.AnimNode.OrientationWarping.Debug
a.AnimNode.OrientationWarping.Debug
#Overview
name: a.AnimNode.OrientationWarping.Debug
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Turn on visualization debugging for Orientation Warping.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of a.AnimNode.OrientationWarping.Debug is to enable visualization debugging for Orientation Warping in the animation system of Unreal Engine 5.
-
This setting variable is primarily used by the animation system, specifically for the Orientation Warping feature.
-
The Unreal Engine subsystem that relies on this setting variable is the Animation Warping plugin, which is part of the animation system. This can be seen from the file path “Engine/Plugins/Animation/AnimationWarping/Source/Runtime/Private/BoneControllers/AnimNode_OrientationWarping.cpp”.
-
The value of this variable is set as a console variable (CVar) with an initial value of 0, meaning it’s disabled by default. It can be changed at runtime through the console or programmatically.
-
This variable interacts with two other variables: CVarAnimNodeOrientationWarpingVerbose and CVarAnimNodeOrientationWarpingEnable. These three variables together control different aspects of Orientation Warping debugging and functionality.
-
Developers must be aware that this variable is only active when ENABLE_ANIM_DEBUG is defined. It’s important to ensure this macro is defined when debugging is needed.
-
Best practices when using this variable include:
- Only enable it when necessary for debugging, as it may impact performance.
- Use it in conjunction with the other related variables for comprehensive debugging.
- Remember to disable it in production builds to avoid any potential performance overhead.
Regarding the associated variable CVarAnimNodeOrientationWarpingDebug:
- This is the actual console variable that controls the debug visualization.
- It’s an integer variable, where values greater than 0 enable debugging.
- It’s used in the FAnimNode_OrientationWarping::EvaluateSkeletalControl_AnyThread function to determine if debugging should be enabled.
- Developers can modify this value at runtime to toggle debugging on and off.
- When using this variable, developers should be mindful of the performance impact of enabling debug visualization, especially in complex scenes or on lower-end hardware.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/Animation/AnimationWarping/Source/Runtime/Private/BoneControllers/AnimNode_OrientationWarping.cpp:16
Scope: file
Source code excerpt:
#if ENABLE_ANIM_DEBUG
static TAutoConsoleVariable<int32> CVarAnimNodeOrientationWarpingDebug(TEXT("a.AnimNode.OrientationWarping.Debug"), 0, TEXT("Turn on visualization debugging for Orientation Warping."));
static TAutoConsoleVariable<int32> CVarAnimNodeOrientationWarpingVerbose(TEXT("a.AnimNode.OrientationWarping.Verbose"), 0, TEXT("Turn on verbose graph debugging for Orientation Warping"));
static TAutoConsoleVariable<int32> CVarAnimNodeOrientationWarpingEnable(TEXT("a.AnimNode.OrientationWarping.Enable"), 1, TEXT("Toggle Orientation Warping"));
#endif
namespace UE::Anim
{
#Associated Variable and Callsites
This variable is associated with another variable named CVarAnimNodeOrientationWarpingDebug
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Plugins/Animation/AnimationWarping/Source/Runtime/Private/BoneControllers/AnimNode_OrientationWarping.cpp:16
Scope: file
Source code excerpt:
#if ENABLE_ANIM_DEBUG
static TAutoConsoleVariable<int32> CVarAnimNodeOrientationWarpingDebug(TEXT("a.AnimNode.OrientationWarping.Debug"), 0, TEXT("Turn on visualization debugging for Orientation Warping."));
static TAutoConsoleVariable<int32> CVarAnimNodeOrientationWarpingVerbose(TEXT("a.AnimNode.OrientationWarping.Verbose"), 0, TEXT("Turn on verbose graph debugging for Orientation Warping"));
static TAutoConsoleVariable<int32> CVarAnimNodeOrientationWarpingEnable(TEXT("a.AnimNode.OrientationWarping.Enable"), 1, TEXT("Toggle Orientation Warping"));
#endif
namespace UE::Anim
{
#Loc: <Workspace>/Engine/Plugins/Animation/AnimationWarping/Source/Runtime/Private/BoneControllers/AnimNode_OrientationWarping.cpp:326
Scope (from outer to inner):
file
function void FAnimNode_OrientationWarping::EvaluateSkeletalControl_AnyThread
Source code excerpt:
constexpr float DebugDrawScale = 1.f;
#endif
const int32 DebugIndex = CVarAnimNodeOrientationWarpingDebug.GetValueOnAnyThread();
bDebugging = bDebugging || (DebugIndex > 0);
if (bDebugging)
{
const FTransform ComponentTransform = Output.AnimInstanceProxy->GetComponentTransform();
const FVector ActorForwardDirection = Output.AnimInstanceProxy->GetActorTransform().GetRotation().GetForwardVector();