๐ ๏ธ Debug Assist
Short Description
Debug Assist provides a suite of high-fidelity visual debugging tools to help developers visualize traces, collisions, and spatial data in real-time.
Long Description
Debug Assist goes beyond standard Unreal debug drawing by providing persistent, styled, and state-aware visualizations. It includes specialized nodes for visualizing complex traces (including swept spheres), projected circles that wrap around geometry, and diamond markers that always face the camera. All debug visuals can be cleared at once using a single command, making it an essential tool for debugging gameplay logic and world interaction.
๐ Features
- Persistent & Duration Based: Draw shapes that stay for a single frame, a few seconds, or indefinitely.
- State-Aware Points: Draw points that change color and size based on a
Success/Failure/Warningstate. - Projected Shapes: Draw circles that "shrink-wrap" onto uneven geometry.
- Trace Visualization: Deep integration with
FHitResultto draw impact points, normals, and swept shapes. - Global Cleanup: Quickly remove all debug visuals with
ClearDebugAssistGhosts.
๐ Usage Examples
UGorgeousDebugAssistBlueprintFunctionLibrary::DrawDebugAssistLine(GetWorld(), Start, End, FLinearColor::Red, 5.0f);
Use the Draw Debug Assist Trace node after a Line or Sphere Trace to visualize exactly what was hit and where.
DrawDebugAssistLine
Draws a simple debug line between two points.
| Parameter Name | Type | Description |
|---|---|---|
Start |
FVector |
Starting location. |
End |
FVector |
Ending location. |
Color |
FLinearColor |
Line color. |
Duration |
float |
Visibility time in seconds. |
DrawDebugAssistSphere
Draws a wireframe or filled sphere at a location.
| Parameter Name | Type | Description |
|---|---|---|
Center |
FVector |
Center point. |
Radius |
float |
Sphere radius. |
bWireframe |
bool |
Whether to draw wireframe. |
bFilled |
bool |
Whether to draw a solid sphere. |
DrawDebugAssistTrace
Visualizes a trace path and its swept volume (for sphere traces).
| Parameter Name | Type | Description |
|---|---|---|
Start |
FVector |
Trace start. |
End |
FVector |
Trace end. |
Radius |
float |
Sphere radius (if applicable). |
DrawDebugAssistProjectedCircle
Draws a circle that projects onto geometry faces to "wrap" around corners. Excellent for floor markers.
| Parameter Name | Type | Description |
|---|---|---|
Location |
FVector |
Center of the projection. |
Radius |
float |
Circle radius. |
Normal |
FVector |
Projection plane normal (usually Up). |
ClearDebugAssistGhosts
Immediately removes all active debug assist visuals from the world.
Best Practices
- Avoid Per-Frame Overload: Drawing hundreds of persistent debug shapes per frame can severely impact performance. Use short durations for frequently updated logic.
- State Coloring: Use the state-aware point functions to quickly identify branching logic results (e.g., Green for a successful interaction check, Red for a failure).
- Projected Markers: Use
DrawDebugAssistProjectedCirclefor player movement destinations or area-of-effect indicators during development.
Troubleshooting
- Z-Fighting: If debug shapes are flickering against geometry, try slightly increasing the
Thicknessor adjusting theRadius. - Not Visible: Check if the
CVarfor debug drawing is enabled in your project's console (Display.DebugLines 1). - Persistent Lines Remaining: If lines won't disappear, use the
ClearDebugAssistGhostsnode or console command.