p.Chaos.DebugDraw.ShowProbeOnly
p.Chaos.DebugDraw.ShowProbeOnly
#Overview
name: p.Chaos.DebugDraw.ShowProbeOnly
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Whether to show ProbeOnly shapes
It is referenced in 4
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of p.Chaos.DebugDraw.ShowProbeOnly is to control the debug drawing of probe-only shapes in the Chaos physics system of Unreal Engine 5. This setting variable is specifically used for debugging and visualization purposes within the physics simulation.
-
The Chaos physics system, which is part of Unreal Engine’s experimental features, relies on this setting variable. It’s primarily used in the debug drawing functionality of the Chaos module.
-
The value of this variable is set using an FAutoConsoleVariableRef, which creates a console variable that can be modified at runtime. It’s initially set to true, meaning probe-only shapes are shown by default.
-
This variable interacts directly with the boolean variable bChaosDebugDebugDrawShowProbeOnlyShapes. They share the same value and are used interchangeably in the code.
-
Developers must be aware that this variable affects the visualization of physics shapes. When set to false, it will prevent the rendering of shapes that are only used for probing (i.e., collision detection without physical simulation).
-
Best practices when using this variable include:
- Use it in conjunction with other debug drawing variables for a comprehensive view of the physics simulation.
- Be mindful of performance implications when enabling extensive debug drawing in a production environment.
- Use it as a diagnostic tool when troubleshooting physics-related issues, especially those involving collision detection.
Regarding the associated variable bChaosDebugDebugDrawShowProbeOnlyShapes:
-
Its purpose is identical to p.Chaos.DebugDraw.ShowProbeOnly, serving as the actual boolean flag that controls the rendering of probe-only shapes.
-
It’s used directly in the DrawShapesImpl and DrawParticleTransformImpl functions within the Chaos::DebugDraw namespace to determine whether to render certain physics shapes.
-
The value is set through the console variable p.Chaos.DebugDraw.ShowProbeOnly.
-
It interacts with other debug drawing flags and shape properties to determine which physics objects should be rendered for debugging purposes.
-
Developers should be aware that this variable directly affects the debug rendering logic and can be useful for isolating and visualizing specific types of physics objects.
-
Best practices include using this variable in conjunction with other debug drawing options to get a clear understanding of the physics simulation state, and toggling it on and off to compare the behavior of probe-only shapes versus other types of physics objects.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Experimental/Chaos/Private/Chaos/ChaosDebugDraw.cpp:82
Scope (from outer to inner):
file
namespace Chaos
namespace DebugDraw
Source code excerpt:
bool bChaosDebugDebugDrawShowProbeOnlyShapes = true;
FAutoConsoleVariableRef CVarChaosDebugDebugDrawShowProbeOnlyShapes(TEXT("p.Chaos.DebugDraw.ShowProbeOnly"), bChaosDebugDebugDrawShowProbeOnlyShapes, TEXT("Whether to show ProbeOnly shapes"));
bool bChaosDebugDebugDrawConvexVertices = false;
bool bChaosDebugDebugDrawCoreShapes = false;
bool bChaosDebugDebugDrawExactCoreShapes = false;
FAutoConsoleVariableRef CVarChaosDebugDrawConvexVertices(TEXT("p.Chaos.DebugDraw.ShowConvexVertices"), bChaosDebugDebugDrawConvexVertices, TEXT("Whether to show the vertices of convex shapes"));
FAutoConsoleVariableRef CVarChaosDebugDrawCoreShapes(TEXT("p.Chaos.DebugDraw.ShowCoreShapes"), bChaosDebugDebugDrawCoreShapes, TEXT("Whether to show the core (margin-reduced) shape where applicable"));
#Associated Variable and Callsites
This variable is associated with another variable named bChaosDebugDebugDrawShowProbeOnlyShapes
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Experimental/Chaos/Private/Chaos/ChaosDebugDraw.cpp:81
Scope (from outer to inner):
file
namespace Chaos
namespace DebugDraw
Source code excerpt:
FAutoConsoleVariableRef CVarChaosDebugDebugDrawShowSimOnlyShapes(TEXT("p.Chaos.DebugDraw.ShowSimOnly"), bChaosDebugDebugDrawShowSimOnlyShapes, TEXT("Whether to show SimOnly shapes"));
bool bChaosDebugDebugDrawShowProbeOnlyShapes = true;
FAutoConsoleVariableRef CVarChaosDebugDebugDrawShowProbeOnlyShapes(TEXT("p.Chaos.DebugDraw.ShowProbeOnly"), bChaosDebugDebugDrawShowProbeOnlyShapes, TEXT("Whether to show ProbeOnly shapes"));
bool bChaosDebugDebugDrawConvexVertices = false;
bool bChaosDebugDebugDrawCoreShapes = false;
bool bChaosDebugDebugDrawExactCoreShapes = false;
FAutoConsoleVariableRef CVarChaosDebugDrawConvexVertices(TEXT("p.Chaos.DebugDraw.ShowConvexVertices"), bChaosDebugDebugDrawConvexVertices, TEXT("Whether to show the vertices of convex shapes"));
FAutoConsoleVariableRef CVarChaosDebugDrawCoreShapes(TEXT("p.Chaos.DebugDraw.ShowCoreShapes"), bChaosDebugDebugDrawCoreShapes, TEXT("Whether to show the core (margin-reduced) shape where applicable"));
#Loc: <Workspace>/Engine/Source/Runtime/Experimental/Chaos/Private/Chaos/ChaosDebugDraw.cpp:833
Scope (from outer to inner):
file
namespace Chaos
namespace DebugDraw
function void DrawShapesImpl
Source code excerpt:
}
}
if (Shape && !bChaosDebugDebugDrawShowProbeOnlyShapes)
{
if (!Shape->GetSimEnabled() && !Shape->GetQueryEnabled())
{
return;
}
}
#Loc: <Workspace>/Engine/Source/Runtime/Experimental/Chaos/Private/Chaos/ChaosDebugDraw.cpp:1119
Scope (from outer to inner):
file
namespace Chaos
namespace DebugDraw
function void DrawParticleTransformImpl
Source code excerpt:
}
}
if (!bChaosDebugDebugDrawShowProbeOnlyShapes)
{
if (IsParticleProbeOnly(InParticle))
{
return;
}
}