p.ChaosRigidsEvolutionApplyPushoutAllowEarlyOut
p.ChaosRigidsEvolutionApplyPushoutAllowEarlyOut
#Overview
name: p.ChaosRigidsEvolutionApplyPushoutAllowEarlyOut
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Allow Chaos Rigids Evolution apply-pushout iterations to early out when resolved.[def:1]
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of p.ChaosRigidsEvolutionApplyPushoutAllowEarlyOut is to control whether the Chaos Rigid Bodies Evolution system can exit its apply-pushout iterations early when the collision resolution is achieved. This setting is part of the physics simulation system in Unreal Engine 5, specifically the Chaos physics engine.
This setting variable is primarily used in the Chaos physics module, which is an experimental feature in Unreal Engine 5. It’s part of the rigid body dynamics simulation, focusing on collision resolution and object interaction.
The value of this variable is set through the Unreal Engine console variable system. It’s initialized with a default value of 1 (true) and can be changed at runtime using console commands.
This variable interacts closely with other Chaos physics settings, particularly:
- ChaosRigidsEvolutionApplyAllowEarlyOut
- ChaosNumPushOutIterationsOverride
- ChaosNumContactIterationsOverride
Developers must be aware that this variable affects the performance and accuracy trade-off in physics simulations. Allowing early out can improve performance but might slightly reduce accuracy in some edge cases.
Best practices when using this variable include:
- Leave it at the default value (1) unless specific performance issues are encountered.
- If changing this value, thoroughly test the physics behavior in your game to ensure it doesn’t negatively impact gameplay.
- Consider adjusting this in conjunction with the other related variables for optimal results.
Regarding the associated variable ChaosRigidsEvolutionApplyPushoutAllowEarlyOutCVar:
This is the actual integer variable that stores the value for the console variable p.ChaosRigidsEvolutionApplyPushoutAllowEarlyOut. It serves the same purpose as described above.
This variable is defined in the Chaos physics module and is exposed through the Unreal Engine console variable system. It’s initialized with a default value of 1.
The ChaosRigidsEvolutionApplyPushoutAllowEarlyOutCVar interacts directly with the physics simulation code, controlling the early-out behavior of the apply-pushout iterations.
Developers should be aware that while they can access this variable directly in C++ code, it’s generally better to use the console variable interface for consistency and to allow for runtime changes.
Best practices for this variable include:
- Avoid modifying it directly in code unless absolutely necessary.
- Use the console variable system to change its value for debugging or performance tuning.
- If you need to read its value in code, consider using the console variable API rather than accessing it directly.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Experimental/Chaos/Private/Chaos/PBDRigidsEvolution.cpp:14
Scope: file
Source code excerpt:
int32 ChaosRigidsEvolutionApplyPushoutAllowEarlyOutCVar = 1;
FAutoConsoleVariableRef CVarChaosRigidsEvolutionApplyPushoutAllowEarlyOut(TEXT("p.ChaosRigidsEvolutionApplyPushoutAllowEarlyOut"), ChaosRigidsEvolutionApplyPushoutAllowEarlyOutCVar, TEXT("Allow Chaos Rigids Evolution apply-pushout iterations to early out when resolved.[def:1]"));
int32 ChaosNumPushOutIterationsOverride = -1;
FAutoConsoleVariableRef CVarChaosNumPushOutIterationsOverride(TEXT("p.ChaosNumPushOutIterationsOverride"), ChaosNumPushOutIterationsOverride, TEXT("Override for num push out iterations if >= 0 [def:-1]"));
int32 ChaosNumContactIterationsOverride = -1;
FAutoConsoleVariableRef CVarChaosNumContactIterationsOverride(TEXT("p.ChaosNumContactIterationsOverride"), ChaosNumContactIterationsOverride, TEXT("Override for num contact iterations if >= 0. [def:-1]"));
#Associated Variable and Callsites
This variable is associated with another variable named ChaosRigidsEvolutionApplyPushoutAllowEarlyOutCVar
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Experimental/Chaos/Private/Chaos/PBDRigidsEvolution.cpp:13
Scope: file
Source code excerpt:
FAutoConsoleVariableRef CVarChaosRigidsEvolutionApplyAllowEarlyOut(TEXT("p.ChaosRigidsEvolutionApplyAllowEarlyOut"), ChaosRigidsEvolutionApplyAllowEarlyOutCVar, TEXT("Allow Chaos Rigids Evolution apply iterations to early out when resolved.[def:1]"));
int32 ChaosRigidsEvolutionApplyPushoutAllowEarlyOutCVar = 1;
FAutoConsoleVariableRef CVarChaosRigidsEvolutionApplyPushoutAllowEarlyOut(TEXT("p.ChaosRigidsEvolutionApplyPushoutAllowEarlyOut"), ChaosRigidsEvolutionApplyPushoutAllowEarlyOutCVar, TEXT("Allow Chaos Rigids Evolution apply-pushout iterations to early out when resolved.[def:1]"));
int32 ChaosNumPushOutIterationsOverride = -1;
FAutoConsoleVariableRef CVarChaosNumPushOutIterationsOverride(TEXT("p.ChaosNumPushOutIterationsOverride"), ChaosNumPushOutIterationsOverride, TEXT("Override for num push out iterations if >= 0 [def:-1]"));
int32 ChaosNumContactIterationsOverride = -1;
FAutoConsoleVariableRef CVarChaosNumContactIterationsOverride(TEXT("p.ChaosNumContactIterationsOverride"), ChaosNumContactIterationsOverride, TEXT("Override for num contact iterations if >= 0. [def:-1]"));
#Loc: <Workspace>/Engine/Source/Runtime/Experimental/Chaos/Public/Chaos/PBDRigidsEvolution.h:25
Scope: file
Source code excerpt:
extern int32 ChaosRigidsEvolutionApplyAllowEarlyOutCVar;
extern int32 ChaosRigidsEvolutionApplyPushoutAllowEarlyOutCVar;
extern int32 ChaosNumPushOutIterationsOverride;
extern int32 ChaosNumContactIterationsOverride;
namespace Chaos
{
extern CHAOS_API int32 ForceNoCollisionIntoSQ;