a.AnimNode.StrideWarping.Debug
a.AnimNode.StrideWarping.Debug
#Overview
name: a.AnimNode.StrideWarping.Debug
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Turn on visualization debugging for Stride Warping
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of a.AnimNode.StrideWarping.Debug is to enable visualization debugging for the Stride Warping animation feature in Unreal Engine 5. This setting variable is primarily used for the animation system, specifically for the Stride Warping functionality.
This setting variable is part of the AnimationWarping plugin, which is a module within the Unreal Engine animation system. The code referencing this variable is located in the AnimationWarping plugin’s runtime source files.
The value of this variable is set through a console variable (CVarAnimNodeStrideWarpingDebug) with an initial value of 0, meaning it’s disabled by default. It can be toggled on or off during runtime or through configuration files.
The associated variable CVarAnimNodeStrideWarpingDebug directly interacts with a.AnimNode.StrideWarping.Debug. They share the same value and purpose.
Developers must be aware that this variable is only active when ENABLE_ANIM_DEBUG is defined, which is typically the case in development builds but may be disabled in shipping builds for performance reasons.
Best practices when using this variable include:
- Use it primarily during development and debugging phases.
- Be cautious about enabling it in production builds, as it may impact performance.
- Use in conjunction with other debug variables like a.AnimNode.StrideWarping.Verbose for more comprehensive debugging.
Regarding the associated variable CVarAnimNodeStrideWarpingDebug:
- It’s a static TAutoConsoleVariable of type int32.
- It’s used to control the debugging state of the Stride Warping feature.
- The variable is checked in the FAnimNode_StrideWarping::GatherDebugData function to determine if debug visualization should be drawn.
- Developers can modify this variable at runtime using console commands, allowing for on-the-fly debugging of the Stride Warping system.
When working with both a.AnimNode.StrideWarping.Debug and CVarAnimNodeStrideWarpingDebug, developers should remember that changes to one will affect the other, as they are essentially the same control for the debugging feature.
#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_StrideWarping.cpp:11
Scope: file
Source code excerpt:
#if ENABLE_ANIM_DEBUG
static TAutoConsoleVariable<int32> CVarAnimNodeStrideWarpingDebug(TEXT("a.AnimNode.StrideWarping.Debug"), 0, TEXT("Turn on visualization debugging for Stride Warping"));
static TAutoConsoleVariable<int32> CVarAnimNodeStrideWarpingVerbose(TEXT("a.AnimNode.StrideWarping.Verbose"), 0, TEXT("Turn on verbose graph debugging for Stride Warping"));
static TAutoConsoleVariable<int32> CVarAnimNodeStrideWarpingEnable(TEXT("a.AnimNode.StrideWarping.Enable"), 1, TEXT("Toggle Stride Warping"));
#endif
void FAnimNode_StrideWarping::GatherDebugData(FNodeDebugData& DebugData)
{
#Associated Variable and Callsites
This variable is associated with another variable named CVarAnimNodeStrideWarpingDebug
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Plugins/Animation/AnimationWarping/Source/Runtime/Private/BoneControllers/AnimNode_StrideWarping.cpp:11
Scope: file
Source code excerpt:
#if ENABLE_ANIM_DEBUG
static TAutoConsoleVariable<int32> CVarAnimNodeStrideWarpingDebug(TEXT("a.AnimNode.StrideWarping.Debug"), 0, TEXT("Turn on visualization debugging for Stride Warping"));
static TAutoConsoleVariable<int32> CVarAnimNodeStrideWarpingVerbose(TEXT("a.AnimNode.StrideWarping.Verbose"), 0, TEXT("Turn on verbose graph debugging for Stride Warping"));
static TAutoConsoleVariable<int32> CVarAnimNodeStrideWarpingEnable(TEXT("a.AnimNode.StrideWarping.Enable"), 1, TEXT("Toggle Stride Warping"));
#endif
void FAnimNode_StrideWarping::GatherDebugData(FNodeDebugData& DebugData)
{
#Loc: <Workspace>/Engine/Plugins/Animation/AnimationWarping/Source/Runtime/Private/BoneControllers/AnimNode_StrideWarping.cpp:130
Scope: file
Source code excerpt:
constexpr float DebugDrawScale = 1.f;
#endif
bDebugging = bDebugging || CVarAnimNodeStrideWarpingDebug.GetValueOnAnyThread() == 1;
if (bDebugging)
{
// Draw Floor Normal
AnimInstanceProxy->AnimDrawDebugDirectionalArrow(
AnimInstanceProxy->GetComponentTransform().TransformPosition(IKFootRootTransform.GetLocation()),
AnimInstanceProxy->GetComponentTransform().TransformPosition(IKFootRootTransform.GetLocation() + ResolvedFloorNormal * 25.f * DebugDrawScale),