p.Chaos.ImmPhys.Joint.AngularProjection
p.Chaos.ImmPhys.Joint.AngularProjection
#Overview
name: p.Chaos.ImmPhys.Joint.AngularProjection
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
6Dof joint projection amount override (if >= 0).
It is referenced in 4
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of p.Chaos.ImmPhys.Joint.AngularProjection is to override the angular projection amount for 6-degree of freedom (6DoF) joints in the Chaos Immediate Physics simulation system.
This setting variable is part of the Unreal Engine’s physics system, specifically the Chaos physics engine’s Immediate Physics module. It is used in the ImmediatePhysicsChaos subsystem, which is responsible for real-time physics simulations.
The value of this variable is set through a console variable (CVar) system. It is defined using FAutoConsoleVariableRef, which allows it to be modified at runtime through console commands or configuration files.
The associated variable ChaosImmediate_Joint_AngularProjection interacts directly with p.Chaos.ImmPhys.Joint.AngularProjection. They share the same value, with ChaosImmediate_Joint_AngularProjection being the actual variable used in the simulation code.
Developers must be aware that this variable only takes effect if its value is greater than or equal to zero. A negative value (-1.0f by default) indicates that the override is not active, and the simulation will use default or per-joint settings instead.
Best practices when using this variable include:
- Only modify it if you need to fine-tune the physics behavior of 6DoF joints across the entire simulation.
- Use it for debugging or performance optimization purposes.
- Be cautious when changing this value, as it can significantly affect the stability and realism of the physics simulation.
- Consider using per-joint settings instead of a global override for more precise control.
Regarding the associated variable ChaosImmediate_Joint_AngularProjection:
Its purpose is to store the actual value used in the physics simulation for the angular projection amount of 6DoF joints.
This variable is used directly in the Chaos Immediate Physics simulation system, specifically in the FSimulation::Simulate function.
The value of this variable is set either through the console variable system or programmatically in the code.
It interacts with the JointsSettings struct, where its value is assigned to the AngularProjectionOverride field.
Developers should be aware that this variable is used as an override, meaning it will replace any per-joint settings if its value is greater than or equal to zero.
Best practices for using this variable include:
- Modifying it only when necessary for global adjustments to joint behavior.
- Monitoring its impact on simulation stability and performance.
- Resetting it to its default value (-1.0f) when specific overrides are no longer needed.
- Using it in conjunction with other joint-related variables for comprehensive physics tuning.
#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:122
Scope: file
Source code excerpt:
FAutoConsoleVariableRef CVarChaosImmPhysJointEnableDrives(TEXT("p.Chaos.ImmPhys.Joint.EnableDrives"), ChaosImmediate_Joint_EnableDrives, TEXT("EnableDrives."));
FAutoConsoleVariableRef CVarChaosImmPhysJointLinearProjection(TEXT("p.Chaos.ImmPhys.Joint.LinearProjection"), ChaosImmediate_Joint_LinearProjection, TEXT("6Dof joint projection amount override (if >= 0)."));
FAutoConsoleVariableRef CVarChaosImmPhysJointAngularProjection(TEXT("p.Chaos.ImmPhys.Joint.AngularProjection"), ChaosImmediate_Joint_AngularProjection, TEXT("6Dof joint projection amount override (if >= 0)."));
FAutoConsoleVariableRef CVarChaosImmPhysJointShockPropagation(TEXT("p.Chaos.ImmPhys.Joint.ShockPropagation"), ChaosImmediate_Joint_ShockPropagation, TEXT("6Dof joint shock propagation override (if >= 0)."));
FAutoConsoleVariableRef CVarChaosImmPhysJointStiffness(TEXT("p.Chaos.ImmPhys.Joint.Stiffness"), ChaosImmediate_Joint_Stiffness, TEXT("6Dof joint stiffness override (if > 0)."));
FAutoConsoleVariableRef CVarChaosImmPhysJointSoftLinearStiffness(TEXT("p.Chaos.ImmPhys.Joint.SoftLinearStiffness"), ChaosImmediate_Joint_SoftLinearStiffness, TEXT("6Dof joint soft linear stiffness override (if > 0)."));
FAutoConsoleVariableRef CVarChaosImmPhysJointSoftTwistStiffness(TEXT("p.Chaos.ImmPhys.Joint.SoftTwistStiffness"), ChaosImmediate_Joint_SoftTwistStiffness, TEXT("6Dof joint SoftTwist stiffness override (if > 0)."));
FAutoConsoleVariableRef CVarChaosImmPhysJointSoftTwistDamping(TEXT("p.Chaos.ImmPhys.Joint.SoftTwistDamping"), ChaosImmediate_Joint_SoftTwistDamping, TEXT("6Dof joint SoftTwist damping override (if > 0)."));
FAutoConsoleVariableRef CVarChaosImmPhysJointSoftSwingStiffness(TEXT("p.Chaos.ImmPhys.Joint.SoftSwingStiffness"), ChaosImmediate_Joint_SoftSwingStiffness, TEXT("6Dof joint SoftSwing stiffness override (if > 0)."));
#Associated Variable and Callsites
This variable is associated with another variable named ChaosImmediate_Joint_AngularProjection
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/PhysicsEngine/ImmediatePhysics/ImmediatePhysicsChaos/ImmediatePhysicsSimulation_Chaos.cpp:98
Scope: file
Source code excerpt:
int32 ChaosImmediate_Joint_EnableDrives = 1;
Chaos::FRealSingle ChaosImmediate_Joint_LinearProjection = -1.0f;
Chaos::FRealSingle ChaosImmediate_Joint_AngularProjection = -1.0f;
Chaos::FRealSingle ChaosImmediate_Joint_ShockPropagation = -1.0f;
Chaos::FRealSingle ChaosImmediate_Joint_Stiffness = -1.0f;
Chaos::FRealSingle ChaosImmediate_Joint_SoftLinearStiffness = -1.0f;
Chaos::FRealSingle ChaosImmediate_Joint_SoftTwistStiffness = -1.0f;
Chaos::FRealSingle ChaosImmediate_Joint_SoftTwistDamping = -1.0f;
Chaos::FRealSingle ChaosImmediate_Joint_SoftSwingStiffness = -1.0f;
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/PhysicsEngine/ImmediatePhysics/ImmediatePhysicsChaos/ImmediatePhysicsSimulation_Chaos.cpp:122
Scope: file
Source code excerpt:
FAutoConsoleVariableRef CVarChaosImmPhysJointEnableDrives(TEXT("p.Chaos.ImmPhys.Joint.EnableDrives"), ChaosImmediate_Joint_EnableDrives, TEXT("EnableDrives."));
FAutoConsoleVariableRef CVarChaosImmPhysJointLinearProjection(TEXT("p.Chaos.ImmPhys.Joint.LinearProjection"), ChaosImmediate_Joint_LinearProjection, TEXT("6Dof joint projection amount override (if >= 0)."));
FAutoConsoleVariableRef CVarChaosImmPhysJointAngularProjection(TEXT("p.Chaos.ImmPhys.Joint.AngularProjection"), ChaosImmediate_Joint_AngularProjection, TEXT("6Dof joint projection amount override (if >= 0)."));
FAutoConsoleVariableRef CVarChaosImmPhysJointShockPropagation(TEXT("p.Chaos.ImmPhys.Joint.ShockPropagation"), ChaosImmediate_Joint_ShockPropagation, TEXT("6Dof joint shock propagation override (if >= 0)."));
FAutoConsoleVariableRef CVarChaosImmPhysJointStiffness(TEXT("p.Chaos.ImmPhys.Joint.Stiffness"), ChaosImmediate_Joint_Stiffness, TEXT("6Dof joint stiffness override (if > 0)."));
FAutoConsoleVariableRef CVarChaosImmPhysJointSoftLinearStiffness(TEXT("p.Chaos.ImmPhys.Joint.SoftLinearStiffness"), ChaosImmediate_Joint_SoftLinearStiffness, TEXT("6Dof joint soft linear stiffness override (if > 0)."));
FAutoConsoleVariableRef CVarChaosImmPhysJointSoftTwistStiffness(TEXT("p.Chaos.ImmPhys.Joint.SoftTwistStiffness"), ChaosImmediate_Joint_SoftTwistStiffness, TEXT("6Dof joint SoftTwist stiffness override (if > 0)."));
FAutoConsoleVariableRef CVarChaosImmPhysJointSoftTwistDamping(TEXT("p.Chaos.ImmPhys.Joint.SoftTwistDamping"), ChaosImmediate_Joint_SoftTwistDamping, TEXT("6Dof joint SoftTwist damping override (if > 0)."));
FAutoConsoleVariableRef CVarChaosImmPhysJointSoftSwingStiffness(TEXT("p.Chaos.ImmPhys.Joint.SoftSwingStiffness"), ChaosImmediate_Joint_SoftSwingStiffness, TEXT("6Dof joint SoftSwing stiffness override (if > 0)."));
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/PhysicsEngine/ImmediatePhysics/ImmediatePhysicsChaos/ImmediatePhysicsSimulation_Chaos.cpp:884
Scope (from outer to inner):
file
namespace ImmediatePhysics_Chaos
function void FSimulation::Simulate
Source code excerpt:
JointsSettings.SwingStiffnessOverride = ChaosImmediate_Joint_Stiffness;
JointsSettings.LinearProjectionOverride = ChaosImmediate_Joint_LinearProjection;
JointsSettings.AngularProjectionOverride = ChaosImmediate_Joint_AngularProjection;
JointsSettings.ShockPropagationOverride = ChaosImmediate_Joint_ShockPropagation;
JointsSettings.SoftLinearStiffnessOverride = ChaosImmediate_Joint_SoftLinearStiffness;
JointsSettings.SoftTwistStiffnessOverride = ChaosImmediate_Joint_SoftTwistStiffness;
JointsSettings.SoftTwistDampingOverride = ChaosImmediate_Joint_SoftTwistDamping;
JointsSettings.SoftSwingStiffnessOverride = ChaosImmediate_Joint_SoftSwingStiffness;
JointsSettings.SoftSwingDampingOverride = ChaosImmediate_Joint_SoftSwingDamping;