p.ChaosCloth.DebugDrawLongRangeConstraint
p.ChaosCloth.DebugDrawLongRangeConstraint
#Overview
name: p.ChaosCloth.DebugDrawLongRangeConstraint
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Whether to debug draw the Chaos Cloth long range constraint (aka tether constraint)
It is referenced in 6
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of p.ChaosCloth.DebugDrawLongRangeConstraint is to enable debug drawing of the Chaos Cloth long range constraint (also known as tether constraint) in Unreal Engine 5’s cloth simulation system.
This setting variable is primarily used in the Chaos Cloth plugin, which is part of Unreal Engine 5’s physics and simulation system. It’s specifically related to the cloth simulation functionality within this plugin.
The value of this variable is set as a console variable, initialized to false by default. It can be toggled on or off during runtime or through the engine’s console.
This variable interacts with several other debug drawing variables for the Chaos Cloth system, such as DebugDrawEdgeConstraint, DebugDrawBendingConstraint, DebugDrawWindForces, DebugDrawSelfCollision, and DebugDrawSelfIntersection. These variables collectively control various aspects of debug visualization for the cloth simulation.
Developers should be aware that this is a debug feature and should only be used during development or debugging sessions. Enabling this in a shipping build could potentially impact performance.
Best practices when using this variable include:
- Only enable it when actively debugging cloth simulation issues.
- Use it in conjunction with other debug drawing options to get a comprehensive view of the cloth simulation.
- Remember to disable it when not needed to avoid unnecessary performance overhead.
Regarding the associated variable DebugDrawLongRangeConstraint:
This is actually the same variable, just referenced in different contexts. It’s defined as a TAutoConsoleVariable in the ClothingSimulationCVar namespace and used throughout the Chaos Cloth simulation code.
The purpose and usage of DebugDrawLongRangeConstraint are identical to p.ChaosCloth.DebugDrawLongRangeConstraint. It’s used to control the debug drawing of long range constraints in the Chaos Cloth simulation.
This variable is primarily used within the FClothingSimulation class to trigger the debug drawing functionality when its value is true. It’s checked during the simulation tick and, if enabled, calls the appropriate debug drawing function.
Developers should treat this variable the same way as p.ChaosCloth.DebugDrawLongRangeConstraint, using it for debugging purposes and ensuring it’s disabled when not needed.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/ChaosCloth/Source/ChaosCloth/Private/ChaosCloth/ChaosClothingSimulation.cpp:82
Scope (from outer to inner):
file
namespace ClothingSimulationCVar
Source code excerpt:
TAutoConsoleVariable<bool> DebugDrawEdgeConstraint (TEXT("p.ChaosCloth.DebugDrawEdgeConstraint" ), false, TEXT("Whether to debug draw the Chaos Cloth edge constraint"), ECVF_Cheat);
TAutoConsoleVariable<bool> DebugDrawBendingConstraint (TEXT("p.ChaosCloth.DebugDrawBendingConstraint" ), false, TEXT("Whether to debug draw the Chaos Cloth bending constraint"), ECVF_Cheat);
TAutoConsoleVariable<bool> DebugDrawLongRangeConstraint (TEXT("p.ChaosCloth.DebugDrawLongRangeConstraint" ), false, TEXT("Whether to debug draw the Chaos Cloth long range constraint (aka tether constraint)"), ECVF_Cheat);
TAutoConsoleVariable<bool> DebugDrawWindForces (TEXT("p.ChaosCloth.DebugDrawWindForces" ), false, TEXT("Whether to debug draw the Chaos Cloth wind forces"), ECVF_Cheat);
TAutoConsoleVariable<bool> DebugDrawSelfCollision (TEXT("p.ChaosCloth.DebugDrawSelfCollision" ), false, TEXT("Whether to debug draw the Chaos Cloth self collision information"), ECVF_Cheat);
TAutoConsoleVariable<bool> DebugDrawSelfIntersection (TEXT("p.ChaosCloth.DebugDrawSelfIntersection" ), false, TEXT("Whether to debug draw the Chaos Cloth self intersection information"), ECVF_Cheat);
}
#endif // #if CHAOS_DEBUG_DRAW
#Loc: <Workspace>/Engine/Plugins/ChaosClothAsset/Source/ChaosClothAssetEngine/Private/ChaosClothAsset/ClothSimulationProxy.cpp:307
Scope (from outer to inner):
file
namespace UE::Chaos::ClothAsset
function void FClothSimulationProxy::Tick
Source code excerpt:
static const TConsoleVariableData<bool>* const DebugDrawEdgeConstraintCVar = IConsoleManager::Get().FindTConsoleVariableDataBool(TEXT("p.ChaosCloth.DebugDrawEdgeConstraint"));
static const TConsoleVariableData<bool>* const DebugDrawBendingConstraintCVar = IConsoleManager::Get().FindTConsoleVariableDataBool(TEXT("p.ChaosCloth.DebugDrawBendingConstraint"));
static const TConsoleVariableData<bool>* const DebugDrawLongRangeConstraintCVar = IConsoleManager::Get().FindTConsoleVariableDataBool(TEXT("p.ChaosCloth.DebugDrawLongRangeConstraint"));
static const TConsoleVariableData<bool>* const DebugDrawWindForcesCVar = IConsoleManager::Get().FindTConsoleVariableDataBool(TEXT("p.ChaosCloth.DebugDrawWindForces"));
static const TConsoleVariableData<bool>* const DebugDrawSelfCollisionCVar = IConsoleManager::Get().FindTConsoleVariableDataBool(TEXT("p.ChaosCloth.DebugDrawSelfCollision"));
static const TConsoleVariableData<bool>* const DebugDrawSelfIntersectionCVar = IConsoleManager::Get().FindTConsoleVariableDataBool(TEXT("p.ChaosCloth.DebugDrawSelfIntersection"));
if (DebugDrawLocalSpaceCVar && DebugDrawLocalSpaceCVar->GetValueOnAnyThread()) { Visualization->DrawLocalSpace(); }
if (DebugDrawBoundsCVar && DebugDrawBoundsCVar->GetValueOnAnyThread()) { Visualization->DrawBounds(); }
#Associated Variable and Callsites
This variable is associated with another variable named DebugDrawLongRangeConstraint
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Plugins/ChaosCloth/Source/ChaosCloth/Private/ChaosCloth/ChaosClothingSimulation.cpp:82
Scope (from outer to inner):
file
namespace ClothingSimulationCVar
Source code excerpt:
TAutoConsoleVariable<bool> DebugDrawEdgeConstraint (TEXT("p.ChaosCloth.DebugDrawEdgeConstraint" ), false, TEXT("Whether to debug draw the Chaos Cloth edge constraint"), ECVF_Cheat);
TAutoConsoleVariable<bool> DebugDrawBendingConstraint (TEXT("p.ChaosCloth.DebugDrawBendingConstraint" ), false, TEXT("Whether to debug draw the Chaos Cloth bending constraint"), ECVF_Cheat);
TAutoConsoleVariable<bool> DebugDrawLongRangeConstraint (TEXT("p.ChaosCloth.DebugDrawLongRangeConstraint" ), false, TEXT("Whether to debug draw the Chaos Cloth long range constraint (aka tether constraint)"), ECVF_Cheat);
TAutoConsoleVariable<bool> DebugDrawWindForces (TEXT("p.ChaosCloth.DebugDrawWindForces" ), false, TEXT("Whether to debug draw the Chaos Cloth wind forces"), ECVF_Cheat);
TAutoConsoleVariable<bool> DebugDrawSelfCollision (TEXT("p.ChaosCloth.DebugDrawSelfCollision" ), false, TEXT("Whether to debug draw the Chaos Cloth self collision information"), ECVF_Cheat);
TAutoConsoleVariable<bool> DebugDrawSelfIntersection (TEXT("p.ChaosCloth.DebugDrawSelfIntersection" ), false, TEXT("Whether to debug draw the Chaos Cloth self intersection information"), ECVF_Cheat);
}
#endif // #if CHAOS_DEBUG_DRAW
#Loc: <Workspace>/Engine/Plugins/ChaosCloth/Source/ChaosCloth/Private/ChaosCloth/ChaosClothingSimulation.cpp:591
Scope (from outer to inner):
file
function void FClothingSimulation::Simulate
Source code excerpt:
if (ClothingSimulationCVar::DebugDrawEdgeConstraint .GetValueOnAnyThread()) { DebugDrawEdgeConstraint (); }
if (ClothingSimulationCVar::DebugDrawBendingConstraint .GetValueOnAnyThread()) { DebugDrawBendingConstraint (); }
if (ClothingSimulationCVar::DebugDrawLongRangeConstraint .GetValueOnAnyThread()) { DebugDrawLongRangeConstraint (); }
if (ClothingSimulationCVar::DebugDrawWindForces .GetValueOnAnyThread()) { DebugDrawWindAndPressureForces(); }
if (ClothingSimulationCVar::DebugDrawSelfCollision .GetValueOnAnyThread()) { DebugDrawSelfCollision (); }
if (ClothingSimulationCVar::DebugDrawSelfIntersection .GetValueOnAnyThread()) { DebugDrawSelfIntersection (); }
#endif // #if CHAOS_DEBUG_DRAW
}
#Loc: <Workspace>/Engine/Plugins/ChaosCloth/Source/ChaosCloth/Public/ChaosCloth/ChaosClothingSimulation.h:106
Scope (from outer to inner):
file
namespace Chaos
class class FClothingSimulation : public FClothingSimulationCommon
function void DebugDrawLongRangeConstraint
Source code excerpt:
void DebugDrawEdgeConstraint(FPrimitiveDrawInterface* PDI = nullptr) const { Visualization.DrawEdgeConstraint(PDI); }
void DebugDrawBendingConstraint(FPrimitiveDrawInterface* PDI = nullptr) const { Visualization.DrawBendingConstraint(PDI); }
void DebugDrawLongRangeConstraint(FPrimitiveDrawInterface* PDI = nullptr) const { Visualization.DrawLongRangeConstraint(PDI); }
void DebugDrawWindAndPressureForces(FPrimitiveDrawInterface* PDI = nullptr) const { Visualization.DrawWindAndPressureForces(PDI); }
UE_DEPRECATED(5.1, "DebugDrawWindForces has been renamed DebugDrawWindAndPressureForces.")
void DebugDrawWindForces(FPrimitiveDrawInterface* PDI = nullptr) const { Visualization.DrawWindAndPressureForces(PDI); }
void DebugDrawLocalSpace(FPrimitiveDrawInterface* PDI = nullptr) const { Visualization.DrawLocalSpace(PDI); }
void DebugDrawSelfCollision(FPrimitiveDrawInterface* PDI = nullptr) const { Visualization.DrawSelfCollision(PDI); }
void DebugDrawSelfIntersection(FPrimitiveDrawInterface* PDI = nullptr) const { Visualization.DrawSelfIntersection(PDI); }
#Loc: <Workspace>/Engine/Plugins/ChaosCloth/Source/ChaosClothEditor/Private/ChaosClothEditor/ChaosSimulationEditorExtender.cpp:78
Scope (from outer to inner):
file
namespace Chaos
Source code excerpt:
FVisualizationOption(&Chaos::FClothingSimulation::DebugDrawEdgeConstraint , TEXT("p.ChaosClothEditor.DebugDrawEdgeConstraint" ), LOCTEXT("ChaosVisName_EdgeConstraint" , "Edge Constraint" ), LOCTEXT("ChaosVisName_EdgeConstraint_Tooltip" , "Draws the edge spring constraints")),
FVisualizationOption(&Chaos::FClothingSimulation::DebugDrawBendingConstraint , TEXT("p.ChaosClothEditor.DebugDrawBendingConstraint" ), LOCTEXT("ChaosVisName_BendingConstraint" , "Bending Constraint" ), LOCTEXT("ChaosVisName_BendingConstraint_Tooltip" , "Draws the bending spring constraints")),
FVisualizationOption(&Chaos::FClothingSimulation::DebugDrawLongRangeConstraint , TEXT("p.ChaosClothEditor.DebugDrawLongRangeConstraint" ), LOCTEXT("ChaosVisName_LongRangeConstraint" , "Long Range Constraint" ), LOCTEXT("ChaosVisName_LongRangeConstraint_Tooltip" , "Draws the long range attachment constraint distances")),
FVisualizationOption(&Chaos::FClothingSimulation::DebugDrawWindAndPressureForces, TEXT("p.ChaosClothEditor.DebugDrawWindAndPressureForces"), LOCTEXT("ChaosVisName_WindAndPressureForces", "Wind Aerodynamic And Pressure Forces"), LOCTEXT("ChaosVisName_WindAndPressure_Tooltip", "Draws the Wind drag and lift and pressure forces")),
FVisualizationOption(&Chaos::FClothingSimulation::DebugDrawLocalSpace , TEXT("p.ChaosClothEditor.DebugDrawLocalSpace" ), LOCTEXT("ChaosVisName_LocalSpace" , "Local Space Reference Bone" ), LOCTEXT("ChaosVisName_LocalSpace_Tooltip" , "Draws the local space reference bone")),
FVisualizationOption(&Chaos::FClothingSimulation::DebugDrawSelfCollision , TEXT("p.ChaosClothEditor.DebugDrawSelfCollision" ), LOCTEXT("ChaosVisName_SelfCollision" , "Self Collision" ), LOCTEXT("ChaosVisName_SelfCollision_Tooltip" , "Draws the self collision thickness/debugging information")),
FVisualizationOption(&Chaos::FClothingSimulation::DebugDrawSelfIntersection , TEXT("p.ChaosClothEditor.DebugDrawSelfIntersection" ), LOCTEXT("ChaosVisName_SelfIntersection" , "Self Intersection" ), LOCTEXT("ChaosVisName_SelfIntersection_Tooltip" , "Draws the self intersection contour/region information")),
};
const uint32 FVisualizationOption::Count = sizeof(OptionData) / sizeof(FVisualizationOption);