Learn

Chapter 07 Collision & World Queries

#070 Debug Draw for Traces

Your trace says it hit nothing, and you can't see why? Turn on Debug Draw.

  • 1:53 video
  • Written lesson
  • Beginner

Free for everyone from 20 Nov 2026, 00:00 CET

Video lesson: Debug Draw for Traces, 1:53

Four options

Every trace node has a Draw Debug Type input.

  • None draws nothing.
  • For One Frame draws a single frame, made for traces on Tick.
  • For Duration keeps each line for Draw Time seconds, five by default.
  • Persistent keeps every line until you call Flush Persistent Debug Lines.

Expand the arrow under the node to change Trace Color, Trace Hit Color and Draw Time.

Reading the colors

The line is red up to the hit, green beyond that point, and a red point marks the impact. No hit at all? The whole line stays red.

Sphere traces draw their swept shape, not just a line.

Example: an interact trace

The trace is drawn For Duration.

  • Aim at the door: red up to the door, green behind the door. The hit is real.
  • Want the Impact Normal too? Draw Debug Arrow, starting at the Impact Point.
  • Aim past the door: one red line, and no hit.

Trace on Tick with For Duration, and five seconds of lines pile up. Use For One Frame instead.

Debug lines only draw in development builds, never in shipping.

Chapter seven recap: collision and world queries

  • Presets set every response, and a block needs both sides to block.
  • Channels separate what a component is from what a trace looks for.
  • Overlaps fire when things pass through. Hits fire when movement is blocked.
  • Line and sphere traces query the world on demand. Break Hit Result tells you where and what, and Actors to Ignore skips your own gear.

Three final tips

  • Check Return Value before you use any hit.
  • Give each kind of trace its own channel, like Interact.
  • When something won’t fire, check both presets, then draw it, before you guess.

Next, chapter eight: player classes and input, starting with Pawn versus Character.

In short

Red up to the hit. Green past the impact.

Covered in this lesson

  • Draw Debug Type
  • Flush Persistent Debug Lines
  • Trace Color
  • Trace Hit Color
  • Draw Time
  • Draw Debug Arrow

Newsletter

Development updates are coming to your inbox.

The newsletter opens soon. Until then, new lessons, tools and Beach Hunters progress appear first on our channels, linked below.