p.Chaos.Collision.CCD.CorrectionIterations

p.Chaos.Collision.CCD.CorrectionIterations

#Overview

name: p.Chaos.Collision.CCD.CorrectionIterations

This variable is created as a Console Variable (cvar).

It is referenced in 3 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of p.Chaos.Collision.CCD.CorrectionIterations is to control the number of post-solve Continuous Collision Detection (CCD) correction iterations in the Chaos physics engine of Unreal Engine 5. This setting is specifically related to the collision system within the Chaos physics simulation.

Regarding the associated variable ChaosCollisionCCDCorrectionIterations:

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Source/Runtime/Experimental/Chaos/Private/Chaos/CCDUtilities.cpp:55

Scope (from outer to inner):

file
namespace    Chaos
namespace    CVars

Source code excerpt:

		// How many post-solve CCD correction iterations to run
		int32 ChaosCollisionCCDCorrectionIterations = 4;
		FAutoConsoleVariableRef CVarChaosCollisionCCDCorrectionIterations(TEXT("p.Chaos.Collision.CCD.CorrectionIterations"), ChaosCollisionCCDCorrectionIterations, TEXT("The number of post-solve CCD correction ietaryions to run."));

		// A multiplier on the constraint CCD threshold that determines how much penetration we allow in the correction phase
		FRealSingle ChaosCollisionCCDCorrectionPhiToleranceScale = 0.02f;
		FAutoConsoleVariableRef CVarChaosCollisionCCDCorrectionPhiToleranceScale(TEXT("p.Chaos.Collision.CCD.CorrectionPhiToleranceScale"), ChaosCollisionCCDCorrectionPhiToleranceScale, TEXT("How much penetration we allow during the correction phase (multiplier on shape size)"));

		extern int32 ChaosSolverDrawCCDInteractions;

#Associated Variable and Callsites

This variable is associated with another variable named ChaosCollisionCCDCorrectionIterations. They share the same value. See the following C++ source code.

#Loc: <Workspace>/Engine/Source/Runtime/Experimental/Chaos/Private/Chaos/CCDUtilities.cpp:54

Scope (from outer to inner):

file
namespace    Chaos
namespace    CVars

Source code excerpt:


		// How many post-solve CCD correction iterations to run
		int32 ChaosCollisionCCDCorrectionIterations = 4;
		FAutoConsoleVariableRef CVarChaosCollisionCCDCorrectionIterations(TEXT("p.Chaos.Collision.CCD.CorrectionIterations"), ChaosCollisionCCDCorrectionIterations, TEXT("The number of post-solve CCD correction ietaryions to run."));

		// A multiplier on the constraint CCD threshold that determines how much penetration we allow in the correction phase
		FRealSingle ChaosCollisionCCDCorrectionPhiToleranceScale = 0.02f;
		FAutoConsoleVariableRef CVarChaosCollisionCCDCorrectionPhiToleranceScale(TEXT("p.Chaos.Collision.CCD.CorrectionPhiToleranceScale"), ChaosCollisionCCDCorrectionPhiToleranceScale, TEXT("How much penetration we allow during the correction phase (multiplier on shape size)"));

		extern int32 ChaosSolverDrawCCDInteractions;

#Loc: <Workspace>/Engine/Source/Runtime/Experimental/Chaos/Private/Chaos/CCDUtilities.cpp:965

Scope (from outer to inner):

file
namespace    Chaos
function     void FCCDManager::ApplyCorrections

Source code excerpt:

		// We iterate to handle stacks of CCD objects and extracting a CCD objects from a wedge.
		const FReal PhiToleranceScale = CVars::ChaosCollisionCCDCorrectionPhiToleranceScale;
		const int32 MaxIterations = CVars::ChaosCollisionCCDCorrectionIterations;
		int32 NumIterations = 0;
		bool bSolved = false;
		while (!bSolved && (NumIterations < MaxIterations))
		{
			bSolved = true;
			++NumIterations;