p.Chaos.DebugDraw.ShowCollisionAnchors

p.Chaos.DebugDraw.ShowCollisionAnchors

#Overview

name: p.Chaos.DebugDraw.ShowCollisionAnchors

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

It is referenced in 3 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of p.Chaos.DebugDraw.ShowCollisionAnchors is to enable or disable the debug drawing of collision anchors in the Chaos physics system of Unreal Engine 5. This setting is primarily used for debugging and visualizing the physics simulation, specifically the collision detection and response.

Regarding the associated variable bChaosDebugDrawCollisionAnchors:

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Source/Runtime/Experimental/Chaos/Private/Chaos/ChaosDebugDraw.cpp:116

Scope (from outer to inner):

file
namespace    Chaos
namespace    DebugDraw

Source code excerpt:


		bool bChaosDebugDrawCollisionAnchors = 0.0f;
		FAutoConsoleVariableRef CVarChaosDebugDrawCollisionAnchors(TEXT("p.Chaos.DebugDraw.ShowCollisionAnchors"), bChaosDebugDrawCollisionAnchors, TEXT(""));

		int32 ChaosConnectionGraphDrawLevelOffset = 0;
		FAutoConsoleVariableRef CVarChaosConnectionGraphDrawLevelOffset(TEXT("p.Chaos.DebugDraw.ConnectionGraphLevelOffset"), ChaosConnectionGraphDrawLevelOffset, TEXT("If 0, draws the connection graph between children particles of active particles. If 1, draws the connection grpah between grand-children particles of active particles, etc."));

		bool bChaosDebugDrawConnectionGraphShowAreas = false;
		FAutoConsoleVariableRef CVarChaosDebugDrawConnectionGraphShowAreas(TEXT("p.Chaos.DebugDraw.ConnectionGraph.ShowAreas"), bChaosDebugDrawConnectionGraphShowAreas, TEXT("When displaying connection graphs show connection areas as disks"));

#Associated Variable and Callsites

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

#Loc: <Workspace>/Engine/Source/Runtime/Experimental/Chaos/Private/Chaos/ChaosDebugDraw.cpp:115

Scope (from outer to inner):

file
namespace    Chaos
namespace    DebugDraw

Source code excerpt:

		FAutoConsoleVariableRef CVarChaosDebugDrawCollisionDuration(TEXT("p.Chaos.DebugDraw.CollisionDuration"), ChaosDebugDrawCollisionDuration, TEXT("How long Collision debug draw should remain on screen in seconds. 0 for 1 frame."));

		bool bChaosDebugDrawCollisionAnchors = 0.0f;
		FAutoConsoleVariableRef CVarChaosDebugDrawCollisionAnchors(TEXT("p.Chaos.DebugDraw.ShowCollisionAnchors"), bChaosDebugDrawCollisionAnchors, TEXT(""));

		int32 ChaosConnectionGraphDrawLevelOffset = 0;
		FAutoConsoleVariableRef CVarChaosConnectionGraphDrawLevelOffset(TEXT("p.Chaos.DebugDraw.ConnectionGraphLevelOffset"), ChaosConnectionGraphDrawLevelOffset, TEXT("If 0, draws the connection graph between children particles of active particles. If 1, draws the connection grpah between grand-children particles of active particles, etc."));

		bool bChaosDebugDrawConnectionGraphShowAreas = false;
		FAutoConsoleVariableRef CVarChaosDebugDrawConnectionGraphShowAreas(TEXT("p.Chaos.DebugDraw.ConnectionGraph.ShowAreas"), bChaosDebugDrawConnectionGraphShowAreas, TEXT("When displaying connection graphs show connection areas as disks"));

#Loc: <Workspace>/Engine/Source/Runtime/Experimental/Chaos/Private/Chaos/ChaosDebugDraw.cpp:1369

Scope (from outer to inner):

file
namespace    Chaos
namespace    DebugDraw
function     void DrawCollisionImpl

Source code excerpt:


				// Static Friction Anchors (bets viewed with DebugDrawPostIntegrateCollisions)
				if (bChaosDebugDrawCollisionAnchors)
				{
					for (int32 PointIndex = 0; PointIndex < Contact.NumSavedManifoldPoints(); ++PointIndex)
					{
						const FSavedManifoldPoint& SavedManifoldPoint = Contact.GetSavedManifoldPoint(PointIndex);
						const int32 ContactPlaneOwner = 1;
						const int32 ContactPointOwner = 1 - ContactPlaneOwner;