a.AnimNode.FootPlacement.Debug.Traces
a.AnimNode.FootPlacement.Debug.Traces
#Overview
name: a.AnimNode.FootPlacement.Debug.Traces
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Turn on visualization debugging for foot ground traces
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of a.AnimNode.FootPlacement.Debug.Traces is to enable visualization debugging for foot ground traces in the Foot Placement animation system. This setting variable is part of the animation debugging toolkit in Unreal Engine 5, specifically for the Foot Placement feature.
This setting variable is primarily used in the Animation Warping plugin, which is part of the animation system in Unreal Engine 5. The code references are found in the AnimationWarping plugin’s runtime module, specifically in the AnimNode_FootPlacement.cpp file.
The value of this variable is set through a console variable (CVarAnimNodeFootPlacementDebugTraces) using the TAutoConsoleVariable template. It is initialized with a default value of false, meaning the debug traces are disabled by default.
This variable interacts with other debug-related variables in the Foot Placement system, such as CVarAnimNodeFootPlacementDebug and CVarAnimNodeFootPlacementDebugDrawHistory. Together, these variables provide different levels and types of debugging visualization for the Foot Placement feature.
Developers must be aware that this variable is intended for debugging purposes only and should not be enabled in production builds. Enabling this debug feature may have performance implications, especially in complex scenes with many characters using foot placement.
Best practices when using this variable include:
- Only enable it when actively debugging foot placement issues.
- Use it in conjunction with other debug variables for a comprehensive view of the foot placement system.
- Remember to disable it after debugging to avoid unnecessary performance overhead.
Regarding the associated variable CVarAnimNodeFootPlacementDebugTraces:
This is the actual console variable that controls the debug traces feature. It is initialized with the same parameters as the a.AnimNode.FootPlacement.Debug.Traces setting. The purpose and usage are identical to what was described above.
The CVarAnimNodeFootPlacementDebugTraces variable is used in the FindPlantTraceImpact function to conditionally draw debug points for the foot ground traces. This helps visualize the start and impact points of the foot placement calculations.
When working with this variable, developers should:
- Access its value using the GetValueOnAnyThread() method when needed in code.
- Be mindful of the performance impact when enabling these debug traces, especially in complex scenes.
- Use this in conjunction with other debugging tools and variables to get a complete picture of the foot placement system’s behavior.
#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_FootPlacement.cpp:18
Scope: file
Source code excerpt:
static TAutoConsoleVariable<bool> CVarAnimNodeFootPlacementEnableLock(TEXT("a.AnimNode.FootPlacement.Enable.Lock"), true, TEXT("Enable/Disable Foot Locking"));
static TAutoConsoleVariable<bool> CVarAnimNodeFootPlacementDebug(TEXT("a.AnimNode.FootPlacement.Debug"), false, TEXT("Turn on visualization debugging for Foot Placement"));
static TAutoConsoleVariable<bool> CVarAnimNodeFootPlacementDebugTraces(TEXT("a.AnimNode.FootPlacement.Debug.Traces"), false, TEXT("Turn on visualization debugging for foot ground traces"));
static TAutoConsoleVariable<int> CVarAnimNodeFootPlacementDebugDrawHistory(TEXT("a.AnimNode.FootPlacement.Debug.DrawHistory"), 0,
TEXT("Turn on history visualization debugging 0 = Disabled, -1 = Pelvis, >1 = Foot Index. Clear with FlushPersistentDebugLines"));
#endif
namespace UE::Anim::FootPlacement
{
#Associated Variable and Callsites
This variable is associated with another variable named CVarAnimNodeFootPlacementDebugTraces
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Plugins/Animation/AnimationWarping/Source/Runtime/Private/BoneControllers/AnimNode_FootPlacement.cpp:18
Scope: file
Source code excerpt:
static TAutoConsoleVariable<bool> CVarAnimNodeFootPlacementEnableLock(TEXT("a.AnimNode.FootPlacement.Enable.Lock"), true, TEXT("Enable/Disable Foot Locking"));
static TAutoConsoleVariable<bool> CVarAnimNodeFootPlacementDebug(TEXT("a.AnimNode.FootPlacement.Debug"), false, TEXT("Turn on visualization debugging for Foot Placement"));
static TAutoConsoleVariable<bool> CVarAnimNodeFootPlacementDebugTraces(TEXT("a.AnimNode.FootPlacement.Debug.Traces"), false, TEXT("Turn on visualization debugging for foot ground traces"));
static TAutoConsoleVariable<int> CVarAnimNodeFootPlacementDebugDrawHistory(TEXT("a.AnimNode.FootPlacement.Debug.DrawHistory"), 0,
TEXT("Turn on history visualization debugging 0 = Disabled, -1 = Pelvis, >1 = Foot Index. Clear with FlushPersistentDebugLines"));
#endif
namespace UE::Anim::FootPlacement
{
#Loc: <Workspace>/Engine/Plugins/Animation/AnimationWarping/Source/Runtime/Private/BoneControllers/AnimNode_FootPlacement.cpp:176
Scope (from outer to inner):
file
namespace UE::Anim::FootPlacement
function static bool FindPlantTraceImpact
Source code excerpt:
#if ENABLE_FOOTPLACEMENT_DEBUG
if (CVarAnimNodeFootPlacementDebugTraces.GetValueOnAnyThread())
{
Context.CSPContext.AnimInstanceProxy->AnimDrawDebugPoint(
TraceStart, 10.0f, FColor::Purple, false, -1.0f, SDPG_Foreground);
Context.CSPContext.AnimInstanceProxy->AnimDrawDebugPoint(
OutImpactLocationWS, 10.0f, FColor::Purple, false, -1.0f, SDPG_Foreground);