p.Chaos.ImmPhys.SimSpaceCentrifugalAlpha
p.Chaos.ImmPhys.SimSpaceCentrifugalAlpha
#Overview
name: p.Chaos.ImmPhys.SimSpaceCentrifugalAlpha
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Settings for simulation space system for rigid body nodes
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of p.Chaos.ImmPhys.SimSpaceCentrifugalAlpha is to control the centrifugal force effect in the simulation space system for rigid body nodes within the Chaos physics engine in Unreal Engine 5.
This setting variable is primarily used in the Immediate Physics subsystem of the Chaos physics engine. It is part of the Engine module, specifically within the ImmediatePhysicsChaos component.
The value of this variable is set through the Unreal Engine Console Variable (CVar) system. It is initialized with a default value of 1.0f and can be modified at runtime using console commands.
This variable interacts closely with two other related variables: SimSpaceCoriolisAlpha and SimSpaceEulerAlpha. Together, these three variables control different aspects of the simulation space system for rigid body nodes.
Developers must be aware that this variable directly affects the physics simulation of rigid bodies. Changing its value will impact the centrifugal force applied to objects in the simulation, which can significantly alter the behavior of rotating or orbiting objects.
Best practices when using this variable include:
- Carefully testing any changes to ensure desired physics behavior.
- Considering the interplay between this variable and the related Coriolis and Euler variables.
- Using it in conjunction with other physics settings to achieve realistic simulations.
Regarding the associated variable ChaosImmediate_Evolution_SimSpaceCentrifugalAlpha:
This is the actual variable that stores the value set by the console variable. It is used directly in the physics simulation code, specifically in the SetSimulationSpaceSettings function of the FSimulation class.
The purpose of this variable is the same as p.Chaos.ImmPhys.SimSpaceCentrifugalAlpha - to control the centrifugal force effect in the simulation space.
It is set by the console variable system and is used within the Immediate Physics subsystem of the Chaos engine.
This variable interacts directly with the physics simulation code, affecting how centrifugal forces are applied to rigid bodies.
Developers should be aware that modifying this variable directly in code (rather than through the console variable system) could lead to inconsistencies if not properly synchronized with the console variable.
Best practices include using the console variable system to modify this value rather than changing it directly in code, and ensuring that any code that relies on this value is prepared to handle potential runtime changes to the variable.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/PhysicsEngine/ImmediatePhysics/ImmediatePhysicsChaos/ImmediatePhysicsSimulation_Chaos.cpp:56
Scope: file
Source code excerpt:
Chaos::FRealSingle ChaosImmediate_Evolution_SimSpaceCoriolisAlpha = 0.5f;
Chaos::FRealSingle ChaosImmediate_Evolution_SimSpaceEulerAlpha = 1.0f;
FAutoConsoleVariableRef CVarChaosImmPhysSimSpaceCentrifugalAlpha(TEXT("p.Chaos.ImmPhys.SimSpaceCentrifugalAlpha"), ChaosImmediate_Evolution_SimSpaceCentrifugalAlpha, TEXT("Settings for simulation space system for rigid body nodes"));
FAutoConsoleVariableRef CVarChaosImmPhysSimSpaceCoriolisAlpha(TEXT("p.Chaos.ImmPhys.SimSpaceCoriolisAlpha"), ChaosImmediate_Evolution_SimSpaceCoriolisAlpha, TEXT("Settings for simulation space system for rigid body nodes"));
FAutoConsoleVariableRef CVarChaosImmPhysSimSpaceEulerAlpha(TEXT("p.Chaos.ImmPhys.SimSpaceEulerAlpha"), ChaosImmediate_Evolution_SimSpaceEulerAlpha, TEXT("Settings for simulation space system for rigid body nodes"));
Chaos::FRealSingle ChaosImmediate_Evolution_MinStepTime = 0.01f;
Chaos::FRealSingle ChaosImmediate_Evolution_FixedStepTime = -1.0f;
Chaos::FRealSingle ChaosImmediate_Evolution_FixedStepTolerance = 0.05f;
#Associated Variable and Callsites
This variable is associated with another variable named ChaosImmediate_Evolution_SimSpaceCentrifugalAlpha
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/PhysicsEngine/ImmediatePhysics/ImmediatePhysicsChaos/ImmediatePhysicsSimulation_Chaos.cpp:53
Scope: file
Source code excerpt:
FAutoConsoleVariableRef CVarChaosImmPhysNumCollisionsPerBlock(TEXT("p.Chaos.ImmPhys.NumCollisionsPerBlock"), ChaosImmediate_Evolution_NumCollisionsPerBlock, TEXT("The number of collision in a block in the collision pool. Higher values give better cache efficieny but waste memory if you do not need that many"));
Chaos::FRealSingle ChaosImmediate_Evolution_SimSpaceCentrifugalAlpha = 1.0f;
Chaos::FRealSingle ChaosImmediate_Evolution_SimSpaceCoriolisAlpha = 0.5f;
Chaos::FRealSingle ChaosImmediate_Evolution_SimSpaceEulerAlpha = 1.0f;
FAutoConsoleVariableRef CVarChaosImmPhysSimSpaceCentrifugalAlpha(TEXT("p.Chaos.ImmPhys.SimSpaceCentrifugalAlpha"), ChaosImmediate_Evolution_SimSpaceCentrifugalAlpha, TEXT("Settings for simulation space system for rigid body nodes"));
FAutoConsoleVariableRef CVarChaosImmPhysSimSpaceCoriolisAlpha(TEXT("p.Chaos.ImmPhys.SimSpaceCoriolisAlpha"), ChaosImmediate_Evolution_SimSpaceCoriolisAlpha, TEXT("Settings for simulation space system for rigid body nodes"));
FAutoConsoleVariableRef CVarChaosImmPhysSimSpaceEulerAlpha(TEXT("p.Chaos.ImmPhys.SimSpaceEulerAlpha"), ChaosImmediate_Evolution_SimSpaceEulerAlpha, TEXT("Settings for simulation space system for rigid body nodes"));
Chaos::FRealSingle ChaosImmediate_Evolution_MinStepTime = 0.01f;
Chaos::FRealSingle ChaosImmediate_Evolution_FixedStepTime = -1.0f;
Chaos::FRealSingle ChaosImmediate_Evolution_FixedStepTolerance = 0.05f;
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/PhysicsEngine/ImmediatePhysics/ImmediatePhysicsChaos/ImmediatePhysicsSimulation_Chaos.cpp:775
Scope (from outer to inner):
file
namespace ImmediatePhysics_Chaos
function void FSimulation::SetSimulationSpaceSettings
Source code excerpt:
SimSpaceSettings.Alpha = Alpha;
SimSpaceSettings.ExternalLinearEtherDrag = ExternalLinearEtherDrag;
SimSpaceSettings.CentrifugalAlpha = ChaosImmediate_Evolution_SimSpaceCentrifugalAlpha;
SimSpaceSettings.CoriolisAlpha = ChaosImmediate_Evolution_SimSpaceCoriolisAlpha;
SimSpaceSettings.EulerAlpha = ChaosImmediate_Evolution_SimSpaceEulerAlpha;
}
void FSimulation::SetSolverSettings(const FReal FixedDt, const FReal CullDistance, const FReal MaxDepenetrationVelocity, const int32 UseLinearJointSolver, const int32 PositionIts, const int32 VelocityIts, const int32 ProjectionIts)
{