p.Chaos.Solver.DebugDraw.ShowServer
p.Chaos.Solver.DebugDraw.ShowServer
#Overview
name: p.Chaos.Solver.DebugDraw.ShowServer
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Draw server related debug data
It is referenced in 4
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of p.Chaos.Solver.DebugDraw.ShowServer is to control the visualization of server-related debug data in the Chaos physics solver of Unreal Engine 5. This setting variable is part of the debug drawing system for the Chaos physics module.
The Unreal Engine subsystem that relies on this setting variable is the Chaos physics solver, which is part of the Experimental Chaos module. This can be seen from the file path and namespace where the variable is defined and used.
The value of this variable is set through the Unreal Engine console variable system. It is initialized with a default value of 1 (enabled) and can be changed at runtime using the console command system.
This variable interacts with another variable named ChaosSolverDebugDrawShowServer. They share the same value and are used interchangeably in the code.
Developers must be aware that this variable is specifically for debug visualization purposes and should not be used for gameplay logic. It’s intended to help developers visualize and debug physics simulations on the server side.
Best practices when using this variable include:
- Use it only during development and debugging phases.
- Disable it in production builds to avoid performance overhead.
- Use it in conjunction with other debug drawing variables for a comprehensive view of the physics simulation.
Regarding the associated variable ChaosSolverDebugDrawShowServer:
The purpose of ChaosSolverDebugDrawShowServer is the same as p.Chaos.Solver.DebugDraw.ShowServer. It controls the visualization of server-related debug data in the Chaos physics solver.
This variable is used within the Chaos physics solver module of Unreal Engine 5.
The value of this variable is set at initialization to 1 (enabled) and can be modified through the console variable system.
It interacts directly with p.Chaos.Solver.DebugDraw.ShowServer, sharing the same value and functionality.
Developers should be aware that this variable is used in conditional statements to determine whether to perform debug drawing for server-related physics data.
Best practices for using this variable are the same as those for p.Chaos.Solver.DebugDraw.ShowServer. It should be used for debugging purposes only and disabled in production builds.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Experimental/Chaos/Private/PBDRigidsSolver.cpp:177
Scope (from outer to inner):
file
namespace Chaos
namespace CVars
Source code excerpt:
FAutoConsoleVariableRef CVarChaosSolverDrawMeshBVHOverlaps(TEXT("p.Chaos.Solver.DebugDrawMeshBVHOverlaps"), ChaosSolverDebugDrawMeshBVHOverlaps, TEXT("Draw BVH of objects overlapping meshes"));
FAutoConsoleVariableRef CVarChaosSolverDebugDrawColorShapeByClientServer(TEXT("p.Chaos.Solver.DebugDraw.ColorShapeByClientServer"), ChaosSolverDebugDrawColorShapeByClientServer, TEXT("Color shape according to client and server: red = server / blue = client "));
FAutoConsoleVariableRef CVarChaosSolverDebugDrawShowServer(TEXT("p.Chaos.Solver.DebugDraw.ShowServer"), ChaosSolverDebugDrawShowServer, TEXT("Draw server related debug data"));
FAutoConsoleVariableRef CVarChaosSolverDebugDrawShowClient(TEXT("p.Chaos.Solver.DebugDraw.ShowClient"), ChaosSolverDebugDrawShowClient, TEXT("Draw client related debug data"));
int32 ChaosSolverDebugDrawPreIntegrationShapes = 0;
int32 ChaosSolverDebugDrawPreIntegrationCollisions = 0;
FAutoConsoleVariableRef CVarChaosSolverDrawPreIntegrationShapes(TEXT("p.Chaos.Solver.DebugDrawPreIntegrationShapes"), ChaosSolverDebugDrawPreIntegrationShapes, TEXT("Draw Shapes prior to integrate."));
FAutoConsoleVariableRef CVarChaosSolverDrawPreIntegrationCollisions(TEXT("p.Chaos.Solver.DebugDrawPreIntegrationCollisions"), ChaosSolverDebugDrawPreIntegrationCollisions, TEXT("Draw Collisions prior to integrate."));
#Associated Variable and Callsites
This variable is associated with another variable named ChaosSolverDebugDrawShowServer
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Experimental/Chaos/Private/PBDRigidsSolver.cpp:142
Scope (from outer to inner):
file
namespace Chaos
namespace CVars
Source code excerpt:
int32 ChaosSolverDebugDrawMeshBVHOverlaps = 0;
int32 ChaosSolverDebugDrawColorShapeByClientServer = 0;
int32 ChaosSolverDebugDrawShowServer = 1;
int32 ChaosSolverDebugDrawShowClient = 1;
DebugDraw::FChaosDebugDrawJointFeatures ChaosSolverDrawJointFeatures = DebugDraw::FChaosDebugDrawJointFeatures::MakeDefault();
FAutoConsoleVariableRef CVarChaosSolverDrawShapes(TEXT("p.Chaos.Solver.DebugDrawShapes"), ChaosSolverDebugDrawShapes, TEXT("Draw Shapes (0 = never; 1 = end of frame)."));
FAutoConsoleVariableRef CVarChaosSolverDebugDrawMass(TEXT("p.Chaos.Solver.DebugDrawMass"), ChaosSolverDebugDrawMass, TEXT("Draw Mass values in Kg (0 = never; 1 = end of frame)."));
FAutoConsoleVariableRef CVarChaosSolverDrawBVHs(TEXT("p.Chaos.Solver.DebugDrawBVHs"), ChaosSolverDebugDrawBVHs, TEXT("Draw Particle BVHs where applicable (0 = never; 1 = end of frame)."));
FAutoConsoleVariableRef CVarChaosSolverDrawCollisions(TEXT("p.Chaos.Solver.DebugDrawCollisions"), ChaosSolverDebugDrawCollisions, TEXT("Draw Collisions (0 = never; 1 = end of frame)."));
#Loc: <Workspace>/Engine/Source/Runtime/Experimental/Chaos/Private/PBDRigidsSolver.cpp:177
Scope (from outer to inner):
file
namespace Chaos
namespace CVars
Source code excerpt:
FAutoConsoleVariableRef CVarChaosSolverDrawMeshBVHOverlaps(TEXT("p.Chaos.Solver.DebugDrawMeshBVHOverlaps"), ChaosSolverDebugDrawMeshBVHOverlaps, TEXT("Draw BVH of objects overlapping meshes"));
FAutoConsoleVariableRef CVarChaosSolverDebugDrawColorShapeByClientServer(TEXT("p.Chaos.Solver.DebugDraw.ColorShapeByClientServer"), ChaosSolverDebugDrawColorShapeByClientServer, TEXT("Color shape according to client and server: red = server / blue = client "));
FAutoConsoleVariableRef CVarChaosSolverDebugDrawShowServer(TEXT("p.Chaos.Solver.DebugDraw.ShowServer"), ChaosSolverDebugDrawShowServer, TEXT("Draw server related debug data"));
FAutoConsoleVariableRef CVarChaosSolverDebugDrawShowClient(TEXT("p.Chaos.Solver.DebugDraw.ShowClient"), ChaosSolverDebugDrawShowClient, TEXT("Draw client related debug data"));
int32 ChaosSolverDebugDrawPreIntegrationShapes = 0;
int32 ChaosSolverDebugDrawPreIntegrationCollisions = 0;
FAutoConsoleVariableRef CVarChaosSolverDrawPreIntegrationShapes(TEXT("p.Chaos.Solver.DebugDrawPreIntegrationShapes"), ChaosSolverDebugDrawPreIntegrationShapes, TEXT("Draw Shapes prior to integrate."));
FAutoConsoleVariableRef CVarChaosSolverDrawPreIntegrationCollisions(TEXT("p.Chaos.Solver.DebugDrawPreIntegrationCollisions"), ChaosSolverDebugDrawPreIntegrationCollisions, TEXT("Draw Collisions prior to integrate."));
#Loc: <Workspace>/Engine/Source/Runtime/Experimental/Chaos/Private/PBDRigidsSolver.cpp:2525
Scope (from outer to inner):
file
namespace Chaos
function void FPBDRigidsSolver::PostTickDebugDraw
Source code excerpt:
const bool bIsServer = GetDebugName().ToString().StartsWith(TEXT("Server"));
if (bIsServer && !ChaosSolverDebugDrawShowServer)
{
return;
}
if (!bIsServer && !ChaosSolverDebugDrawShowClient)
{
return;