AoE Target/Range indicators

I have already posted a question about this, and didn’t get many answers, so I decided to repost.

I want to create spell range indicators and I am very much struggling. To be more specific, whenever you click any spell in a MOBA for example it tells you the cast range for it before casting. If you have ever played a MOBA/MMORPG you know

I already know that it is possible to do this with Decals or Particle systems but I have no idea how, I have tried looking on videos on youtube/here in the answerhub but I could not make it work. I have exhausted pretty much all of my options, except this one.

All help is appreciated and thank you for your time.

Wish i could be more helpful, but since I cant try anything right now i would suggest you figure out how to get such a decal placed in your level without worrying about blueprints or coding, creating, moving, or destroying it dynamically. just add it as a decoration. once you figure out how to do that, You can probably get the same results by either spawning it in blueprint or having it already exist as a component where you toggle visibility on/off and initialize it with the same settings that worked when t was a fixture in your level. from there you can figure out how to aim it.

Decals are kind of like tv projectors, casting an image from a source point onto a surface.

hope that helps if only a little bit.

heres the basics of adding a decal via blueprint. what i did here was to spawn the decal at the actors location, i set the rotation so that it projects in the -z direction aka downward, and set the life span to 0 so it would persist forever. i then attached the decal to the players capsule so that the decal would move with the player. i then added a way to destroy the decal for testing (this could have also been done with a flipflop). of course this is just the basics and theres room for improvement. if you decided to use a method like this you may want to look into making the decal size a variable and using a local to world space conversion to get more customizeable shapes.

1 Like

Hello, thank you very much for the reply. This is a good start for me, I managed to make it project fine. But there is one problem, the projection is a square, I need it to look more like a triangle/cone in some scenarios, thank you for your time!

its always going to be a square or rectangle overall but you can use the properties in the material to define the image and shape of the image that renders. below ill post some pictures of the material i used and its effect. basically i set the material to deferred decal then set the blend mode to translucent. this allows us to use a mask for the opacity so we can have parts of the decal that are invisible.

Edit: i made a crude cone shape as a texture and and used it in the material just so you could see that it could be done. in the below picture you can see how it looked in game and below that is the mask that i used for the translucency.

1 Like

After countless hours of work I finally figured it out, I downloaded a picture of a triangle and did exactly what you did, and using some Trig I was able to adjust the decal size to match where the projectiles were going, thank you for the help.