You set the enemy's detection distance to 800 , but it does not react to the player right in front of it. Even with the number entered correctly, how far that range reaches on screen is hard to picture.
In that case, draw a sphere of radius 800 around the enemy. If the player is outside it, you can investigate distance first. If they are inside it, move on to the next conditions such as facing and wall occlusion.
This article tries the Draw Debug nodes that draw check lines and spheres. Read values with Print String and see spatial relationships with Draw Debug. Combining the two makes internal game behavior easier to follow.
What You'll Learn
- Displaying position, radius, and facing as spheres and cones
- The relationship between Duration and when you call the drawing
- Choosing between the editor's built-in display and drawing your own
- Reading back recorded moments with the Visual Logger
Tie numbers to sizes in the game world
UE's standard length unit is cm. A radius of 800 is 8 m and measures from the center to the sphere's surface . End to end, the diameter is 16 m.

What is unclear is less the number itself and more "from where", "in which direction", and "how far" you measure. An attack volume's center might be at the feet rather than the hand, or a guard's forward might differ from the model's face.
Passing the position and distance actually used in the check into the drawing is what finds these mismatches. Entering different numbers for display makes only the diagram look correct, so watch for that.
Choosing among Draw Debug nodes
Searching Draw Debug in a Blueprint's Event Graph offers nodes per shape.

| Node | What it draws | Where it fits |
|---|---|---|
| Draw Debug Sphere | A sphere's outline | Enemy detection distance, explosion radius |
| Draw Debug Line | A line from start to end | The relation between an enemy and its target |
| Draw Debug Box | A box's outline | Room and trigger volumes |
| Draw Debug Arrow | An arrow | Movement or knockback direction |
| Draw Debug Cone | A cone's outline | A guide for a forward field of view |
| Draw Debug String | Text at a specified 3D position | The current state next to an enemy |
Position, size, color, and display time are enough to start. A Box's "Extent" is half the size from the center to each face, not the box's full width. A Cone draws a cone spreading vertically too, not a flat fan.
Draw Debug String specifies where the text appears in "Text Location". Adding (0, 0, 120) to an Actor's position, for instance, puts it 120 cm above. When passing world coordinates like that, leave "Test Base Actor" unspecified. Specifying a target makes the position relative to that Actor, so do not mix the two.
Line Trace has its own display setting. A Line Trace extends a line from a start to an end point and checks what it hits. Setting
Line Trace by Channel's "Draw Debug Type" to "For Duration" displays the traced line and hit position. To investigate the trace itself, that setting is easier (see the Line Trace article).
Duration is how many seconds lines persist
Duration sets how many seconds a drawn shape remains. We deal with nodes that draw shapes as lines, such as Sphere and Cone. 0 means "one frame only". A frame is one update of the game's screen.

| Where you call it | Duration | How it looks |
|---|---|---|
| Event BeginPlay: once at start | 10.0 | Stays where drawn for 10 seconds |
| Event BeginPlay: once at start | 0.0 | Disappears after one frame |
| Event Tick: every frame | 0.0 | Redrawn each time, so it follows a moving target |
A sphere drawn in BeginPlay does not follow the Actor afterwards. To match a moving enemy, pass its position at that moment every Tick. Conversely, a long Duration on Tick leaves old lines overlapping like a trail.
The standard Blueprint Draw Debug Sphere has no "Persistent Lines" setting. To study a static shape at leisure, lengthen Duration first. Not confusing it with settings from C++-oriented articles matters.
Try the editor's display first
For existing collision volumes and light ranges, you can often check without building drawing nodes.
| What you want to see | How |
|---|---|
| Collision shapes | "Show → Collision" in the viewport, or the console command show collision during Play |
| NavMesh: the walkable area AI uses to find paths | P in the level viewport. Displaying it requires a NavMesh to exist |
| The range of a Point Light and similar | Select the light Actor |
| Sphere / Box Collision shapes | Select that component in the Blueprint editor or level |
Collision is the hit volume and a component is a part attached to an Actor. Selecting a Sphere Collision and changing its radius already lets you judge the size visually.
Draw Debug earns its place when following a range that moves during Play or when you want to see a position built from variables and calculations. Our exercise draws a sphere from a variable holding the radius.

Hands-On: draw a radius-800 range and the forward facing
In a test level from the Third Person template, build a BP_Guard that displays a range. We build display only and add no AI spotting or chasing logic. Drawing a sphere and detecting who enters it are separate.
1. Place a check Actor
Actor is the base class for things placed in a level. Here we prepare an Actor with a box as a marker in place of a guard.
- Create "Blueprint Class → Actor" in the Content Browser and name it
BP_Guard. - Open it, add a "Static Mesh" via "Add", and choose
Cubein the Static Mesh field. That marks the position. - Create a Float
SightRangeunder "My Blueprint → Variables". Float is the numeric type handling decimals. - Compile, then set its default to
800.0and save. - Place one in the level on a wide walkable floor. Set the Actor's Scale to
(1, 1, 1)and Rotation to(0, 0, 0). Adjust the position so the box does not sink into the floor and save the level.
SightRange is a variable name we chose to represent range. UE does not read that name and enable AI sight automatically.
2. Draw the sphere
In BP_Guard's Event Graph, add Draw Debug Sphere from Event Tick 's white exec pin. Configure its inputs as follows.

"To the next Cone" in the diagram notes where we connect in a later step. You can test with just the Sphere for now.
| Input | Value / setting |
|---|---|
| Center | Get Actor Location 's Return Value with Target Self |
| Radius | A Get of the variable SightRange |
| Segments | 16 |
| Line Color | Blue |
| Duration | 0.0 |
| Thickness | 2.0 |
Self is the BP_Guard running this graph. Get Actor Location reads that Actor's position and passes it from Return Value. That position is not necessarily the model's visual center but the Actor's origin.
Place a variable Get by dragging the variable into the graph and choosing "Get". Get Actor Location and variable Gets have no white exec pin, so connect their value outputs into the Sphere's corresponding inputs . The white exec line goes directly from Tick to Sphere.
Compile, Save, and Play, and a blue sphere appears centered on the box's position. Move the camera and walk inside and outside the sphere to compare. Even with the lower half hidden by the floor, the whole sphere's center is the box Actor's position.
Next stop Play, change SightRange's default to 1200.0 , and Play again. The sphere widening is success. You can compare the range going from 8 m to 12 m against the surrounding floor and walls.
3. Draw a cone forward
Stop Play and connect Draw Debug Cone from Draw Debug Sphere's white output. This time we use the Actor's facing as well as distance.

| Input | Value / setting |
|---|---|
| Origin | Get Actor Location 's Return Value with Target Self |
| Direction | Get Actor Forward Vector 's Return Value with Target Self |
| Length | A Get of SightRange |
| Angle Width / Angle Height | Enter 45.0 for both |
| Num Sides | 16 |
| Line Color | Yellow |
| Duration / Thickness | 0.0 / 2.0 |
A Forward Vector is the direction representing an Actor's front. It is not a position, so do not connect Get Actor Location into Direction. In UE, an Actor's own X axis is its front, so with zero rotation the cone extends along world positive X.
The standard Blueprint node used here takes angles in degrees . Enter 45.0 directly. The angle is the spread from the center line to one side, so 45 degrees each way is 90 degrees total. The same-named function in C++'s DrawDebugHelpers uses different units, but this procedure needs no radian conversion.
Compile, Save, Play, and confirm the yellow cone. Stop Play, change the Actor's Z rotation to 90 degrees, and Play again to see the facing change. Then change only "Angle Width" from 45 to 60 to widen the horizontal spread. Changing one value at a time makes it easier to confirm what each setting affects.
What the shapes tell you and what they do not
Spheres and cones are markers drawing the values you passed . When adding to real AI, pass the same position, range, and facing as the detection logic and compare. Even with the shape reaching the target, it says nothing about wall occlusion, the target's settings, or a forgotten check call (see AI Perception).
| Problem | Where to check |
|---|---|
| Nothing is drawn | Whether BP_Guard is placed, whether the white exec line connects, whether you are in Play |
| It appears for an instant | Whether you call it from BeginPlay with Duration 0 |
| Old spheres pile up | Whether you call from Tick with a long Duration |
| It appears near the origin | Whether you pass a position into Center / Origin |
| The cone faces the wrong way | The Actor's rotation and Forward Vector. Whether you rotated only the mesh |
| The cone is too narrow | Whether the angle is passed in degrees, and whether an unnecessary radian conversion crept in |
After checking, remove the test Actor or disconnect the drawing nodes. To build it into normal game logic, a Boolean variable toggling the display is convenient.
Revisit recorded moments with the Visual Logger
The trouble with Draw Debug is that the moment you want passes. "The enemy turned toward me for an instant — what was it heading for?" To keep that moment's information, use the Visual Logger .

The Visual Logger records positions, shapes, states, and more sent tied to an Actor, along with the time. It reads back recorded data rather than rewinding the whole game like video. Spheres drawn with Draw Debug are not recorded automatically.
- Open it from "Window → Developer Tools → Visual Logger". Some UE versions offer it directly under Window.
- Turn the record button on and Play.
- Reproduce the motion you want to investigate, then stop recording and end Play.
- Choose the target that sent records from the Actor list and pick a moment on the timeline. The timeline lays records out in time order.
- Compare the position, shapes, and text at that moment. Save the record to a file if needed.
Some of UE's AI features send information to the Visual Logger, but not every Actor's state is recorded automatically . Our BP_Guard only draws, so it does not record our own range or variables as is.
To record your own information, use the position and text logging nodes under "Debug → Visual Logger" in Blueprint. VisLog Location (or Log Location on some versions), for instance, records a position. Call it while recording is running and pass the position to investigate into Location. Get comfortable with on-the-spot checks in Draw Debug first and add this when you want to investigate a moment you missed.
Bonus: good to know up front
- Do not use it for production range display : the debug drawing covered here is for development. It does not display in a normal Shipping build. For attack ranges shown to players, use Decals projecting patterns onto the ground or display meshes.
- Narrow down who draws : many enemies drawing spheres every frame costs performance in the display itself. Start with one Actor under investigation.
- Segments changes smoothness : it is how many segments divide the sphere's lines. Raising it smooths the shape, but readable outlines are enough for checking.
- Give colors roles : blue for distance, yellow for facing, or whatever combination you can distinguish. To investigate logs and variables alongside shapes, combine with the Blueprint Debugger.
Summary
Draw Debug lets you draw the position, distance, and facing you pass into logic and confirm them in place. Start by drawing one sphere and comparing as you change the radius. Redraw on Tick for moving targets, and specify seconds from BeginPlay for static shapes.
Once ranges are visible, combine with logs to grow the set of things you can confirm as "correct so far". To investigate further back in time, recording the information you need to the Visual Logger helps.