# DrawDebugLine unlit?

**URL:** <https://forums.unrealengine.com/t/drawdebugline-unlit/313827>\
**Category:** Rendering\
**Tags:** debug-draw, unreal-engine, Lighting, CPP, question\
**Created:** [April 4, 2015, 7:29pm UTC](https://forums.unrealengine.com/t/drawdebugline-unlit/313827 "2015-04-04T19:29:09Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![MorskoyZmey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MorskoyZmey](https://forums.unrealengine.com/u/MorskoyZmey)\
**Post date:** [April 4, 2015, 7:29pm UTC](https://forums.unrealengine.com/t/drawdebugline-unlit/313827/1 "2015-04-04T19:29:09Z")

</div>

Hi,

In 4.7.3+ engine version I see that debug lines, which can be drawn through DrawDebug[Line/Point/Sphere] now getting light and darkness.

Is this bug or feature? And how I can make them unlit like before?

Thanks

---

<div class="post-metadata">

**Author:** ![Lovecraft\_K](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lovecraft\_K](https://forums.unrealengine.com/u/Lovecraft_K)\
**Post date:** [April 6, 2015, 3:36pm UTC](https://forums.unrealengine.com/t/drawdebugline-unlit/313827/2 "2015-04-06T15:36:13Z")

</div>

Hi MordskoyZmey -

Can you let me know what thickness, color and duration you are using in your debug setup? I am not seeing my lines be effected by lighting in the level. I am using a Red Color (1,0,0,1) and a thickness of 1 with a duration of 5 secs.

Let me know -

Eric Ketchum

---

<div class="post-metadata">

**Author:** ![MorskoyZmey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MorskoyZmey](https://forums.unrealengine.com/u/MorskoyZmey)\
**Post date:** [April 8, 2015, 10:49am UTC](https://forums.unrealengine.com/t/drawdebugline-unlit/313827/3 "2015-04-08T10:49:29Z")

</div>

My setup is

```
DrawDebugLine( World, Position1, Position2, FColor::Cyan, true, -1.0, 0, 1);

```

I am using FlushPersistentDebugLines()

Maybe this happens because of this settings (using for right decals):

---

<div class="post-metadata">

**Author:** ![Lovecraft\_K](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lovecraft\_K](https://forums.unrealengine.com/u/Lovecraft_K)\
**Post date:** [April 8, 2015, 2:11pm UTC](https://forums.unrealengine.com/t/drawdebugline-unlit/313827/4 "2015-04-08T14:11:36Z")

</div>

Hi MorskoyZmey -

I am still not getting the behavior that you are describing, my debug lines and spheres are rendering as expected without lights. I also tried as in the picture below, to turn on DBuffer Decals and the Early Z-Pass settings with no rendering differences.

 ![37968-debuglinesphere.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/6/4/d64dc82b26a1cd38493a439fee340c0afa5516d6.jpeg)

Could you post a screenshot of what you are getting when the lines and spheres render for you?

Thank You

Eric Ketchum

---

<div class="post-metadata">

**Author:** ![Lovecraft\_K](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lovecraft\_K](https://forums.unrealengine.com/u/Lovecraft_K)\
**Post date:** [April 14, 2015, 1:39pm UTC](https://forums.unrealengine.com/t/drawdebugline-unlit/313827/5 "2015-04-14T13:39:53Z")

</div>

Hi MorskoyZmey -

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will offer further assistance.

Thank you -

Eric Ketchum

---

<div class="post-metadata">

**Author:** ![MorskoyZmey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MorskoyZmey](https://forums.unrealengine.com/u/MorskoyZmey)\
**Post date:** [April 15, 2015, 11:45am UTC](https://forums.unrealengine.com/t/drawdebugline-unlit/313827/6 "2015-04-15T11:45:15Z")

</div>

Sorry for delay. Just tested 4.7.5

Still have an issue with lines lighting

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [April 15, 2015, 8:54pm UTC](https://forums.unrealengine.com/t/drawdebugline-unlit/313827/7 "2015-04-15T20:54:07Z")

</div>

Hey MorskoyZmey-

Where in your code is the line you mentioned earlier declared and where/how is it getting called? Also, how are you calculating the Position1 and Position2 variables? I created a function for an actor that when called gets the player location as the line start and the actor’s location as the line end and makes the call to DrawDebugLine(). If possible could you post the code you used so that we can make sure our setup matches.

Cheers

---

<div class="post-metadata">

**Author:** ![MorskoyZmey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MorskoyZmey](https://forums.unrealengine.com/u/MorskoyZmey)\
**Post date:** [April 17, 2015, 5:28pm UTC](https://forums.unrealengine.com/t/drawdebugline-unlit/313827/8 "2015-04-17T17:28:29Z")

</div>

I don’t get how line position can affect the line rendering. I have some points in space, nothing special. I can say that I drawing persistent debug lines and spheres in actor Tick method, after `FlushPersistentDebugLines` call, so they persis until next Tick called.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [April 20, 2015, 1:45pm UTC](https://forums.unrealengine.com/t/drawdebugline-unlit/313827/9 "2015-04-20T13:45:40Z")

</div>

If you’re drawing the lines on Tick then that means they are being redrawn every tick. I can’t say for certain what effect that would have without knowing how they are setup. Could you show us the code you use so that I can test out the same thing on my end?
