p.GeometryCollection.EnabledNestedChildTransformUpdates
p.GeometryCollection.EnabledNestedChildTransformUpdates
#Overview
name: p.GeometryCollection.EnabledNestedChildTransformUpdates
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Enable updates for driven, disabled, child bodies. Used for line trace results against geometry collections.[def: true]
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of p.GeometryCollection.EnabledNestedChildTransformUpdates is to control the updating of transforms for driven, disabled child bodies within Geometry Collections. This setting is primarily used for line trace results against geometry collections in Unreal Engine’s physics system.
This setting variable is part of the Chaos physics system, specifically within the Geometry Collection module. It is utilized in the Experimental/Chaos runtime module of Unreal Engine.
The value of this variable is set through a console variable (CVar) system. It is initialized with a default value of true and can be modified at runtime through console commands.
The associated variable bGeometryCollectionEnabledNestedChildTransformUpdates directly interacts with this setting. They share the same value and are used interchangeably in the code.
Developers should be aware that this variable affects the performance and accuracy of line traces against geometry collections. Enabling this feature ensures that even disabled child bodies within a geometry collection have their transforms updated, which can be crucial for certain gameplay mechanics or visual feedback.
Best practices when using this variable include:
- Leaving it enabled (default) unless there’s a specific performance reason to disable it.
- If disabling, thoroughly test line traces and any gameplay systems that rely on accurate geometry collection transforms.
- Consider the impact on both runtime performance and gameplay behavior when modifying this setting.
Regarding the associated variable bGeometryCollectionEnabledNestedChildTransformUpdates:
- It is a boolean flag used directly in the C++ code to control the behavior of transform updates.
- It is used in the BufferPhysicsResults_Internal function of the FGeometryCollectionPhysicsProxy class to determine whether to update child transforms.
- Developers should treat this variable as read-only within their code, as its value is controlled by the console variable system.
- When this flag is true, it ensures that child transforms are updated even when their parent clusters are disabled, maintaining consistency in the geometry collection’s state.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Experimental/Chaos/Private/PhysicsProxy/GeometryCollectionPhysicsProxy.cpp:92
Scope: file
Source code excerpt:
bool bGeometryCollectionEnabledNestedChildTransformUpdates = true;
FAutoConsoleVariableRef CVarEnabledNestedChildTransformUpdates(
TEXT("p.GeometryCollection.EnabledNestedChildTransformUpdates"),
bGeometryCollectionEnabledNestedChildTransformUpdates,
TEXT("Enable updates for driven, disabled, child bodies. Used for line trace results against geometry collections.[def: true]"));
bool bGeometryCollectionAlwaysGenerateGTCollisionForClusters = true;
FAutoConsoleVariableRef CVarGeometryCollectionAlwaysGenerateGTCollisionForClusters(
TEXT("p.GeometryCollection.AlwaysGenerateGTCollisionForClusters"),
#Associated Variable and Callsites
This variable is associated with another variable named bGeometryCollectionEnabledNestedChildTransformUpdates
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Experimental/Chaos/Private/PhysicsProxy/GeometryCollectionPhysicsProxy.cpp:90
Scope: file
Source code excerpt:
bool bGeometryCollectionEnabledNestedChildTransformUpdates = true;
FAutoConsoleVariableRef CVarEnabledNestedChildTransformUpdates(
TEXT("p.GeometryCollection.EnabledNestedChildTransformUpdates"),
bGeometryCollectionEnabledNestedChildTransformUpdates,
TEXT("Enable updates for driven, disabled, child bodies. Used for line trace results against geometry collections.[def: true]"));
bool bGeometryCollectionAlwaysGenerateGTCollisionForClusters = true;
FAutoConsoleVariableRef CVarGeometryCollectionAlwaysGenerateGTCollisionForClusters(
TEXT("p.GeometryCollection.AlwaysGenerateGTCollisionForClusters"),
bGeometryCollectionAlwaysGenerateGTCollisionForClusters,
#Loc: <Workspace>/Engine/Source/Runtime/Experimental/Chaos/Private/PhysicsProxy/GeometryCollectionPhysicsProxy.cpp:3892
Scope (from outer to inner):
file
function void FGeometryCollectionPhysicsProxy::BufferPhysicsResults_Internal
Source code excerpt:
}
if (bGeometryCollectionEnabledNestedChildTransformUpdates)
{
if (ClusterParent && !ClusterParent->Disabled())
{
const FRigidTransform3 ChildToWorld = Handle->ChildToParent() * FRigidTransform3(ClusterParent->GetX(), ClusterParent->GetR());
UpdateParticleHandleTransformIfNeeded(*CurrentSolver, *Handle, ChildToWorld);
// fields may have applied velocities, we need to make sure to clear that up, so that we don't accumulate