# How to draw a circle around an actor?

**URL:** <https://forums.unrealengine.com/t/how-to-draw-a-circle-around-an-actor/459638>\
**Category:** Rendering\
**Tags:** draw, unreal-engine, Spline, Rendering, Blueprint, question\
**Created:** [December 17, 2019, 4:22pm UTC](https://forums.unrealengine.com/t/how-to-draw-a-circle-around-an-actor/459638 "2019-12-17T16:22:57Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![PerCat](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/percat/32/479573_2.png) [@PerCat](https://forums.unrealengine.com/u/PerCat)\
**Post date:** [December 17, 2019, 4:22pm UTC](https://forums.unrealengine.com/t/how-to-draw-a-circle-around-an-actor/459638/1 "2019-12-17T16:22:57Z")

</div>

Hey all. I’m trying to figure out a way to draw a circle “border” around an actor. Imagine like the borders around cities in civ.

So when a player places down a building their border will grow to the new building and that would be their “border” my initial thought was to just get the bound of an object and place a simple decal down scaled to fit that. But I’m wondering if there’s a better way to do it? I though about a spline mesh that’s just a line with a simple material or a beam particle but I don’t know how I could continually add point/take away to build on itself and make it grow in a circleish shape.

I know this is a pretty involved question really just looking for some tips on the best way to approach this.

Edit: Okay so the world is made of tiles, I figured the best way to do this would be to draw a multisphere trace around the city any tiles that are hit get their origin location added to a spline. Is it possible to just get the edges of the sphere trace?

Maybe two? One bigger and one slightly smaller if they are hit by both do nothing if they are only hit by the big one do something?

Here’s something I threw together real quick, I’m trying to get the hit tiles _between_ those two traces, then use their location for the spline points.

That’s all done with two multisphere traces. Since they are hism I have to do a cast and add instance world transform to an array I break it for vector. On the output I’m just for looping and adding an instance of a cube.

The trace doesn’t seem to be able to draw a circle, increasing the error tolerance just makes a square of empty, so the corners are cut off and the 4 edges across from each other are like 3 thick.

Here’s a link to the [code.](https://imgur.com/a/w16gatT)

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [December 17, 2019, 6:47pm UTC](https://forums.unrealengine.com/t/how-to-draw-a-circle-around-an-actor/459638/2 "2019-12-17T18:47:29Z")

</div>

> a simple decal down scaled to fit  
> that. But I’m wondering if there’s a  
> better way to do it?

That would work well, even if the underlying surface is uneven.

> I though about a spline mesh that’s  
> just a line with a simple material  
> […] and make it grow in a circleish  
> shape.

Have a look here:

> [@Solar System Simulator/Generator](https://forums.unrealengine.com/t/solar-system-simulator-generator/62571/15):
>
> I lifted what was relevant from an old project (opening 4.17 → 4.27 is no fun at all! wink but still pretty stunned it actually opens & works almost out of the box!): Project link: Here’s what this actor can do: Some basic controls for this are exposed but it needs a ton of features to make it useable / more flexible. I’d start with adding controls for how many SMCs are needed for smaller / larger orbits - currently it’s a fixed number. May be fine depending on what this is going to be u…

I know it’s 3.5 year old but I still use it these days, a slightly modified version.

* * *

edit: also, I think Rama’s Victory plugin has drawing functions exposed - they’re based on the debug draw shapes that are already in the engine. Unlike the engine’s debug, the plugin’s nodes do work in the packaged.

* * *

You could also use a widget component aligned with the ground - this would give you a lot of flexibility since now you’d have access to both the material (optionally) _and_ the widget animations. The downside - not everyone likes working with widgets ;p

* * *

Pretty sure you could do it with particles, maybe with ribbons but I’m not good with particles so can’t really suggest anything tangible here.

For something really fancy looking, you could _combine_ one of the above methods with particles. I think decal is the most natural option here.

---

<div class="post-metadata">

**Author:** ![PerCat](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/percat/32/479573_2.png) [@PerCat](https://forums.unrealengine.com/u/PerCat)\
**Post date:** [December 18, 2019, 5:07am UTC](https://forums.unrealengine.com/t/how-to-draw-a-circle-around-an-actor/459638/3 "2019-12-18T05:07:19Z")

</div>

Hmm well it doesn’t have to be super fancy looking. Ideally at the end it would auto generate around player structures most likely just a basic circle. And then allow the player to “draw/erase” the borders if they want.

I figured a decal would be easiest as I could just literally do a circle scale it up to fit the bounds of things. But then the problem becomes how do you draw/erase a decal? Cause in civ not every border is a perfect circle and if the player wants to draw there border it wouldn’t _always_ be a circle.

I figured spline might be good somehow have it deform/form around and then draw a line along it. I’ll test the decals in the morning and update this. Thanks!

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [December 18, 2019, 9:06am UTC](https://forums.unrealengine.com/t/how-to-draw-a-circle-around-an-actor/459638/4 "2019-12-18T09:06:52Z")

</div>

If you need it deform to a non-circular shape then opt for a spline. A decal will not cut it.

Yet another solution is to use post-process:

This way you can keep the border as a geometric shape and have it highlighted. Since geometry is easy to manipulate, extending the border is any direction / by shape should be fairly easy.

---

<div class="post-metadata">

**Author:** ![PerCat](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/percat/32/479573_2.png) [@PerCat](https://forums.unrealengine.com/u/PerCat)\
**Post date:** [December 18, 2019, 4:42pm UTC](https://forums.unrealengine.com/t/how-to-draw-a-circle-around-an-actor/459638/5 "2019-12-18T16:42:50Z")

</div>

Okay so the world is made of tiles, I figured the best way to do this would be to draw a multisphere trace around the city any tiles that are hit get their origin location added to a spline. Is it possible to just get the edges of the sphere trace?

Maybe two? One bigger and one slightly smaller if they are hit by both do nothing if they are only hit by the big one do something?

Here’s something I threw together real quick, I’m trying to get the hit tiles _between_ those two traces, then use their location for the spline points.

That’s all done with two multisphere traces. Since they are hism I have to do a cast and add instance world transform to an array I break it for vector. On the output I’m just for looping and adding an instance of a cube.

The trace doesn’t seem to be able to draw a circle, increasing the error tolerance just makes a square of empty, so the corners are cut off and the 4 edges across from each other are like 3 thick.

Edit: Didn’t realize images were broke, here’s a link to the [code.](https://imgur.com/a/w16gatT)

---

<div class="post-metadata">

**Author:** ![PerCat](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/percat/32/479573_2.png) [@PerCat](https://forums.unrealengine.com/u/PerCat)\
**Post date:** [December 25, 2019, 12:42am UTC](https://forums.unrealengine.com/t/how-to-draw-a-circle-around-an-actor/459638/7 "2019-12-25T00:42:30Z")

</div>

I think your lost

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [December 29, 2019, 12:50pm UTC](https://forums.unrealengine.com/t/how-to-draw-a-circle-around-an-actor/459638/8 "2019-12-29T12:50:32Z")

</div>

It’s a bot.

---

<div class="post-metadata">

**Author:** ![DuneGames](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/dunegames/32/538495_2.png) [@DuneGames](https://forums.unrealengine.com/u/DuneGames)\
**Post date:** [August 21, 2023, 2:16pm UTC](https://forums.unrealengine.com/t/how-to-draw-a-circle-around-an-actor/459638/9 "2023-08-21T14:16:53Z")

</div>

Old thread, but interesting. Your link to the solar system simulator generator is broken.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [August 21, 2023, 2:26pm UTC](https://forums.unrealengine.com/t/how-to-draw-a-circle-around-an-actor/459638/10 "2023-08-21T14:26:34Z")

</div>

As is half my links since the infamous forum migration of 2021. Fixed now.
