p.SecondChannelDelay

p.SecondChannelDelay

#Overview

name: p.SecondChannelDelay

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

It is referenced in 5 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of p.SecondChannelDelay is to set a delay for the second channel in the Chaos physics system of Unreal Engine 5. This variable is primarily used in the physics simulation and interpolation processes.

Regarding the associated variable SecondChannelDelay:

The purpose of SecondChannelDelay is to store the actual delay value used in the Chaos physics calculations. It’s the implementation variable that corresponds to the console variable p.SecondChannelDelay.

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Source/Runtime/Experimental/Chaos/Private/Chaos/Framework/ChaosResultsManager.cpp:264

Scope (from outer to inner):

file
namespace    Chaos

Source code excerpt:


	FRealSingle SecondChannelDelay = 0.05f;
	FAutoConsoleVariableRef CVarSecondChannelDelay(TEXT("p.SecondChannelDelay"), SecondChannelDelay, TEXT(""));

	int32 DefaultNumActiveChannels = 1;
	FAutoConsoleVariableRef CVarNumActiveChannels(TEXT("p.NumActiveChannels"), DefaultNumActiveChannels, TEXT(""));

	FChaosResultsManager::FChaosResultsManager(FChaosMarshallingManager& InMarshallingManager)
		: MarshallingManager(InMarshallingManager)

#Associated Variable and Callsites

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

#Loc: <Workspace>/Engine/Source/Programs/HeadlessChaos/Private/HeadlessChaosTestRewind.cpp:4357

Scope (from outer to inner):

file
namespace    ChaosTest
function     GTEST_TEST
lambda-function

Source code excerpt:

				Time += GtDt;
				const FReal InterpolatedTime0 = Time - SimDt * Solver->GetAsyncInterpolationMultiplier();
				const FReal InterpolatedTime1 = InterpolatedTime0 - Chaos::SecondChannelDelay;

				if (InterpolatedTime0 < 0)
				{
					//No movement yet
					EXPECT_NEAR(Particle.X()[2], 0, 1e-2);
				}

#Loc: <Workspace>/Engine/Source/Runtime/Experimental/Chaos/Private/Chaos/Framework/ChaosResultsManager.cpp:263

Scope (from outer to inner):

file
namespace    Chaos

Source code excerpt:

	}

	FRealSingle SecondChannelDelay = 0.05f;
	FAutoConsoleVariableRef CVarSecondChannelDelay(TEXT("p.SecondChannelDelay"), SecondChannelDelay, TEXT(""));

	int32 DefaultNumActiveChannels = 1;
	FAutoConsoleVariableRef CVarNumActiveChannels(TEXT("p.NumActiveChannels"), DefaultNumActiveChannels, TEXT(""));

	FChaosResultsManager::FChaosResultsManager(FChaosMarshallingManager& InMarshallingManager)
		: MarshallingManager(InMarshallingManager)

#Loc: <Workspace>/Engine/Source/Runtime/Experimental/Chaos/Private/Chaos/Framework/ChaosResultsManager.cpp:279

Scope (from outer to inner):

file
namespace    Chaos
function     FChaosResultsManager::FChaosResultsManager

Source code excerpt:


		PerChannelTimeDelay.Add(0);
		PerChannelTimeDelay.Add(SecondChannelDelay);
	}

	const FChaosInterpolationResults& FChaosResultsChannel::UpdateInterpAlpha_External(FReal ResultsTime, const FReal GlobalAlpha)
	{
		Results.Alpha = (float)GlobalAlpha;	 // LWC_TODO: Precision loss

#Loc: <Workspace>/Engine/Source/Runtime/Experimental/Chaos/Public/Chaos/Framework/ChaosResultsManager.h:7

Scope (from outer to inner):

file
namespace    Chaos

Source code excerpt:

	class FChaosMarshallingManager;
	
	extern FRealSingle SecondChannelDelay;
	extern int32 DefaultNumActiveChannels;

	struct FChaosRigidInterpolationData
	{
		FDirtyRigidParticleData Prev;
		FDirtyRigidParticleData Next;