p.Chaos.Solver.TestMode.ShowInitialTransforms
p.Chaos.Solver.TestMode.ShowInitialTransforms
#Overview
name: p.Chaos.Solver.TestMode.ShowInitialTransforms
This variable is created as a Console Variable (cvar).
- type:
Var
- help: ``
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of p.Chaos.Solver.TestMode.ShowInitialTransforms is to control the display of initial transforms in the Chaos solver’s test mode. This setting variable is part of the Chaos physics system in Unreal Engine 5, specifically related to the solver’s debugging and testing capabilities.
The Unreal Engine subsystem that relies on this setting variable is the Chaos physics system, particularly the PBD (Position Based Dynamics) Rigids Evolution solver. This can be inferred from the file name “PBDRigidsEvolutionGBF.cpp” where the variable is defined and used.
The value of this variable is set using an FAutoConsoleVariableRef, which means it can be changed at runtime through the console or configuration files. By default, it is set to false.
This variable interacts with another boolean variable named bChaos_Solver_TestMode_Enabled. Both of these variables need to be true for the TestModeRestoreParticles() function to be called in the AdvanceOneTimeStepImpl function.
Developers must be aware that this variable is part of a test mode and should only be used for debugging purposes. It’s not intended for use in production builds or final game logic.
Best practices when using this variable include:
- Only enable it when actively debugging the Chaos solver.
- Use it in conjunction with other test mode variables like p.Chaos.Solver.TestMode.Enabled for comprehensive debugging.
- Disable it in production builds to avoid any performance impact.
Regarding the associated variable bChaos_Solver_TestMode_ShowInitialTransforms:
The purpose of bChaos_Solver_TestMode_ShowInitialTransforms is to store the actual boolean value that controls whether initial transforms are shown in the Chaos solver’s test mode.
This variable is used directly in the Chaos physics system, specifically in the PBDRigidsEvolutionGBF class.
The value of this variable is set through the console variable p.Chaos.Solver.TestMode.ShowInitialTransforms, which allows it to be changed at runtime.
It interacts with bChaos_Solver_TestMode_Enabled, as both need to be true for certain test mode functionality to be activated.
Developers should be aware that this is an internal variable used to store the state of the console variable. They should interact with the console variable (p.Chaos.Solver.TestMode.ShowInitialTransforms) rather than this internal variable directly.
Best practices for this variable are similar to those for the console variable: use it only for debugging, ensure it’s disabled in production, and use it in conjunction with other test mode settings for comprehensive debugging of the Chaos solver.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Experimental/Chaos/Private/Chaos/PBDRigidsEvolutionGBF.cpp:178
Scope (from outer to inner):
file
namespace Chaos
namespace CVars
Source code excerpt:
bool bChaos_Solver_TestMode_ShowInitialTransforms = false;
FAutoConsoleVariableRef CVarChaosSolverTestModeShowInitialTransforms(TEXT("p.Chaos.Solver.TestMode.ShowInitialTransforms"), bChaos_Solver_TestMode_ShowInitialTransforms, TEXT(""));
int32 Chaos_Solver_TestMode_Step = 0;
FAutoConsoleVariableRef CVarChaosSolverTestModeStep(TEXT("p.Chaos.Solver.TestMode.Step"), Chaos_Solver_TestMode_Step, TEXT(""));
// Set to true to enable some debug validation of the Particle Views every frame
bool bChaosSolverCheckParticleViews = false;
#Associated Variable and Callsites
This variable is associated with another variable named bChaos_Solver_TestMode_ShowInitialTransforms
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Experimental/Chaos/Private/Chaos/PBDRigidsEvolutionGBF.cpp:177
Scope (from outer to inner):
file
namespace Chaos
namespace CVars
Source code excerpt:
FAutoConsoleVariableRef CVarChaosSolverTestModeEnabled(TEXT("p.Chaos.Solver.TestMode.Enabled"), bChaos_Solver_TestMode_Enabled, TEXT(""));
bool bChaos_Solver_TestMode_ShowInitialTransforms = false;
FAutoConsoleVariableRef CVarChaosSolverTestModeShowInitialTransforms(TEXT("p.Chaos.Solver.TestMode.ShowInitialTransforms"), bChaos_Solver_TestMode_ShowInitialTransforms, TEXT(""));
int32 Chaos_Solver_TestMode_Step = 0;
FAutoConsoleVariableRef CVarChaosSolverTestModeStep(TEXT("p.Chaos.Solver.TestMode.Step"), Chaos_Solver_TestMode_Step, TEXT(""));
// Set to true to enable some debug validation of the Particle Views every frame
bool bChaosSolverCheckParticleViews = false;
#Loc: <Workspace>/Engine/Source/Runtime/Experimental/Chaos/Private/Chaos/PBDRigidsEvolutionGBF.cpp:702
Scope (from outer to inner):
file
namespace Chaos
function void FPBDRigidsEvolutionGBF::AdvanceOneTimeStepImpl
Source code excerpt:
#if CHAOS_EVOLUTION_COLLISION_TESTMODE
if (CVars::bChaos_Solver_TestMode_Enabled && CVars::bChaos_Solver_TestMode_ShowInitialTransforms)
{
TestModeRestoreParticles();
}
#endif
if (CVars::DoFinalProbeNarrowPhase)