# Draw lines like DrawDebugLines

**URL:** <https://forums.unrealengine.com/t/draw-lines-like-drawdebuglines/434465>\
**Category:** C++\
**Tags:** unreal-engine, UE4, CPP, question\
**Created:** [September 25, 2018, 11:47am UTC](https://forums.unrealengine.com/t/draw-lines-like-drawdebuglines/434465 "2018-09-25T11:47:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![azmon6](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@azmon6](https://forums.unrealengine.com/u/azmon6)\
**Post date:** [September 25, 2018, 11:47am UTC](https://forums.unrealengine.com/t/draw-lines-like-drawdebuglines/434465/1 "2018-09-25T11:47:53Z")

</div>

Basically I just want a easy way to draw temporary lines between points and the function DrawDebugLines is perfect, besides the fact it doesn’t show up in a packaged program. So my question is is there a easy way to implement DrawDebugLines without that limitation?

---

<div class="post-metadata">

**Author:** ![NicholasMont](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NicholasMont](https://forums.unrealengine.com/u/NicholasMont)\
**Post date:** [September 25, 2018, 5:29pm UTC](https://forums.unrealengine.com/t/draw-lines-like-drawdebuglines/434465/2 "2018-09-25T17:29:07Z")

</div>

Hey azmon6,

DrawDebugLines is usually a developer tool used to debug, so it will lose it’s functional visibility in a packaged project, however you can achieve a similar visual effect in your packaged game through different Unreal utilities.

For instance, you could create your own beam particle without adding any noise modifier, to achieve a “straight line” effect; similar to that seen in DrawDebugLines. I’ve included a screenshot of an actor blueprint, which creates a particle component, then you can set your beam source and target points using a vector variable.

 ![254678-bp-beamlineactor.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/0/2/c02695a22204072bbe69cd7e7ab2992257587f1e.png)

Here is also a link on a tutorial on how to create a beam particle: [Beam Particle (Tutorial)][2]

It is also possible to use a ULineBatchComponent and it’s draw functions to achieve a line draw within your scene.

I’ve included a link to that documentation here: [UlineBatchComponent][3]

Hope this helps!

---

<div class="post-metadata">

**Author:** ![azmon6](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@azmon6](https://forums.unrealengine.com/u/azmon6)\
**Post date:** [September 27, 2018, 6:00am UTC](https://forums.unrealengine.com/t/draw-lines-like-drawdebuglines/434465/3 "2018-09-27T06:00:06Z")

</div>

Thank you for your help, worked after some fine tuning.

---

<div class="post-metadata">

**Author:** ![SuryaPrakashModi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SuryaPrakashModi](https://forums.unrealengine.com/u/SuryaPrakashModi)\
**Post date:** [May 25, 2021, 7:21am UTC](https://forums.unrealengine.com/t/draw-lines-like-drawdebuglines/434465/4 "2021-05-25T07:21:54Z")

</div>

watch this. [How To Do Line Tracing Using C++ In Unreal Engine - YouTube](https://youtu.be/LWeQicz_teo)
