# How do i get rid of the gaps in the lines? 

**URL:** <https://forums.unrealengine.com/t/how-do-i-get-rid-of-the-gaps-in-the-lines/2724338>\
**Category:** Programming & Scripting\
**Tags:** UE-5, canvas, unreal-engine, render-target, question, Blueprint\
**Created:** [May 25, 2026, 5:45pm UTC](https://forums.unrealengine.com/t/how-do-i-get-rid-of-the-gaps-in-the-lines/2724338 "2026-05-25T17:45:25Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mathos1453](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mathos1453](https://forums.unrealengine.com/u/Mathos1453)\
**Post date:** [May 25, 2026, 5:45pm UTC](https://forums.unrealengine.com/t/how-do-i-get-rid-of-the-gaps-in-the-lines/2724338/1 "2026-05-25T17:45:26Z")

</div>

i’m using draw canvas to render target to make a simple drawing UI, but the lines always have these gaps in them, how do i make the lines smooth?

i’m almost certain that i need to do something with the lerp, but nothing i’ve tried has helped, so maybe i’m wrong

 ![Untitled](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/f/4/0f40214adaee01d7ef94814a65c05a3bfabfa2b4.jpeg)

 ![Screenshot 2026-05-25 174004](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/3/0/73095b8873c9bbf10bc82bd805b365021e6fc264.png)

---

<div class="post-metadata">

**Author:** ![Mind-Brain](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mind-brain/32/906573_2.png) [@Mind-Brain](https://forums.unrealengine.com/u/Mind-Brain)\
**Post date:** [May 25, 2026, 6:00pm UTC](https://forums.unrealengine.com/t/how-do-i-get-rid-of-the-gaps-in-the-lines/2724338/2 "2026-05-25T18:00:47Z")

</div>

Hey @Mathos1453! Welcome to the forums!

The screen snip is too far away ☹ Can you get us some pictures that are closer up? It’s making the resolution too small, maybe break it up into 2 or 3 pics instead? We need to be able to read the text, we need to see the context :P.

But without looking at the code I will say it’s likely that you should generate lines BETWEEN the points instead of generating ON the point because it will only do that every frame. If you move the reticle too quickly you will get gaps, like when you move your mouse across your screen really fast, how it skips.

So to do that, on tick you  
GET Old Point → Get New Point → Draw line between new point and old point → set new point as old point and voila you got a constant frame-by-frame loop while mouse is held. You constantly recycle points from new to old this way.

Hope that helps! 🙂 Let us know if you need more help and bring some more close-up pics!

---

<div class="post-metadata">

**Author:** ![Mathos1453](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mathos1453](https://forums.unrealengine.com/u/Mathos1453)\
**Post date:** [May 25, 2026, 7:22pm UTC](https://forums.unrealengine.com/t/how-do-i-get-rid-of-the-gaps-in-the-lines/2724338/4 "2026-05-25T19:22:20Z")

</div>

thank you! and sorry about the pictures, i hope these are more clear

 ![Screenshot 2026-05-25 191316](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/3/8/538f2fe70b8a193cd11917356dd5e31923d9ee8b.png)

 ![Screenshot 2026-05-25 191325](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/8/c/68cb2e5b1238cb8797d6d0e04601d51fb70bfa58.png)

 ![Screenshot 2026-05-25 191330](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/5/e/e5ec9a3cec11504658d4ecd134554bb58400fdd7.png)

---

<div class="post-metadata">

**Author:** ![AlienRenders](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AlienRenders](https://forums.unrealengine.com/u/AlienRenders)\
**Post date:** [May 25, 2026, 8:41pm UTC](https://forums.unrealengine.com/t/how-do-i-get-rid-of-the-gaps-in-the-lines/2724338/5 "2026-05-25T20:41:54Z")

</div>

It seems you were trying to draw a line by drawing many circles. But in your attempt, you made your for loop exit the function on its first iteration. The return node should be connected to the completed pin of the for loop. However, drawing many circles will not draw a line.

Here’s a material function that will draw a proper line. Start and End positions coordinates are in percentages. (0 to 1).

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/2/2/922b1868b22cbc7e9d797f4e7c53e8f787e148e7.png)

MF\_ScaleToHalf is subtract 0.5 and then multiply by 2.

The output is opacity, so just connect it to your opacity pin on your material.

Here’s an example UI material:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/3/d/83d7c2c8131f9595c0da4e9b789e573ada46c3b1.png)

---

<div class="post-metadata">

**Author:** ![Mathos1453](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mathos1453](https://forums.unrealengine.com/u/Mathos1453)\
**Post date:** [May 26, 2026, 2:36am UTC](https://forums.unrealengine.com/t/how-do-i-get-rid-of-the-gaps-in-the-lines/2724338/6 "2026-05-26T02:36:01Z")

</div>

that did it! thanks!

 ![Screenshot 2026-05-26 033442](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/d/4/6d4e8275e5d0d7bcb8991c7a0a44e76bffd22444.png)

---

<div class="post-metadata">

**Author:** ![AlienRenders](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AlienRenders](https://forums.unrealengine.com/u/AlienRenders)\
**Post date:** [May 26, 2026, 2:57am UTC](https://forums.unrealengine.com/t/how-do-i-get-rid-of-the-gaps-in-the-lines/2724338/7 "2026-05-26T02:57:02Z")

</div>

HAHA Nice!
