p.Chaos.DebugDraw.ShowQueryOnly
p.Chaos.DebugDraw.ShowQueryOnly
#Overview
name: p.Chaos.DebugDraw.ShowQueryOnly
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Whether to show QueryOnly shapes
It is referenced in 5
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of p.Chaos.DebugDraw.ShowQueryOnly is to control the visibility of QueryOnly shapes in the Chaos physics debug drawing system. This setting variable is part of the Chaos physics engine’s debug visualization toolset in Unreal Engine 5.
-
The Chaos physics engine, which is part of Unreal Engine’s Experimental module, relies on this setting variable. Specifically, it’s used in the debug drawing functionality of Chaos.
-
The value of this variable is set using an FAutoConsoleVariableRef, which means it can be changed at runtime through console commands or configuration files.
-
This variable interacts directly with the bool variable bChaosDebugDebugDrawShowQueryOnlyShapes. They share the same value and purpose.
-
Developers must be aware that this variable affects the debug visualization of physics shapes. When set to false, it will hide QueryOnly shapes, which might be useful for focusing on other types of physics shapes during debugging.
-
Best practices when using this variable include:
- Use it in conjunction with other debug drawing variables to isolate specific types of physics shapes.
- Be aware that hiding QueryOnly shapes might affect your ability to debug certain physics interactions.
- Remember to reset this variable to its default value (true) when not actively debugging to ensure all relevant information is visible.
Regarding the associated variable bChaosDebugDebugDrawShowQueryOnlyShapes:
-
Its purpose is identical to p.Chaos.DebugDraw.ShowQueryOnly - it controls the visibility of QueryOnly shapes in the Chaos physics debug drawing system.
-
It is used in several functions within the Chaos::DebugDraw namespace, specifically in DrawShapesImpl, DrawParticleTransformImpl, and DrawParticleMassImpl.
-
The value is set through the console variable p.Chaos.DebugDraw.ShowQueryOnly.
-
It interacts with the logic for drawing various physics shapes and particle information.
-
Developers should be aware that this variable directly affects the behavior of multiple debug drawing functions in the Chaos physics system.
-
Best practices include using this variable in conjunction with other debug drawing flags to isolate specific types of physics objects for visualization and debugging purposes.
#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:76
Scope (from outer to inner):
file
namespace Chaos
namespace DebugDraw
Source code excerpt:
bool bChaosDebugDebugDrawShowQueryOnlyShapes = true;
FAutoConsoleVariableRef CVarChaosDebugDebugDrawShowQueryOnlyShapes(TEXT("p.Chaos.DebugDraw.ShowQueryOnly"), bChaosDebugDebugDrawShowQueryOnlyShapes, TEXT("Whether to show QueryOnly shapes"));
bool bChaosDebugDebugDrawShowSimOnlyShapes = true;
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"));
#Associated Variable and Callsites
This variable is associated with another variable named bChaosDebugDebugDrawShowQueryOnlyShapes
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Experimental/Chaos/Private/Chaos/ChaosDebugDraw.cpp:75
Scope (from outer to inner):
file
namespace Chaos
namespace DebugDraw
Source code excerpt:
FAutoConsoleVariableRef CVarChaosDebugDebugDrawColorBoundsByShapeType(TEXT("p.Chaos.DebugDraw.ColorBoundsByShapeType"), bChaosDebugDebugDrawColorBoundsByShapeType, TEXT("Whether to use shape type to define the color of the bounds instead of using the particle state (if multiple shapes , will use the first one)"));
bool bChaosDebugDebugDrawShowQueryOnlyShapes = true;
FAutoConsoleVariableRef CVarChaosDebugDebugDrawShowQueryOnlyShapes(TEXT("p.Chaos.DebugDraw.ShowQueryOnly"), bChaosDebugDebugDrawShowQueryOnlyShapes, TEXT("Whether to show QueryOnly shapes"));
bool bChaosDebugDebugDrawShowSimOnlyShapes = true;
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"));
#Loc: <Workspace>/Engine/Source/Runtime/Experimental/Chaos/Private/Chaos/ChaosDebugDraw.cpp:819
Scope (from outer to inner):
file
namespace Chaos
namespace DebugDraw
function void DrawShapesImpl
Source code excerpt:
}
}
if (Shape && !bChaosDebugDebugDrawShowQueryOnlyShapes)
{
if (!Shape->GetSimEnabled() && !Shape->GetIsProbe())
{
return;
}
}
#Loc: <Workspace>/Engine/Source/Runtime/Experimental/Chaos/Private/Chaos/ChaosDebugDraw.cpp:1105
Scope (from outer to inner):
file
namespace Chaos
namespace DebugDraw
function void DrawParticleTransformImpl
Source code excerpt:
void DrawParticleTransformImpl(const FRigidTransform3& SpaceTransform, const FGeometryParticleHandle* InParticle, int32 Index, FRealSingle ColorScale, const FChaosDebugDrawSettings& Settings)
{
if (!bChaosDebugDebugDrawShowQueryOnlyShapes)
{
if (IsParticleQueryOnly(InParticle))
{
return;
}
}
#Loc: <Workspace>/Engine/Source/Runtime/Experimental/Chaos/Private/Chaos/ChaosDebugDraw.cpp:1530
Scope (from outer to inner):
file
namespace Chaos
namespace DebugDraw
function void DrawParticleMassImpl
Source code excerpt:
if (const auto RigidParticle = InParticle->CastToRigidParticle())
{
if (!bChaosDebugDebugDrawShowQueryOnlyShapes)
{
if (IsParticleQueryOnly(InParticle))
{
return;
}
}