MOBA-like target /range indicators?

Hello everyone!
I wanted to ask how I could approach the creation of a MOBA like target and or range indicator! I am thinking something like league of legends actually - not particularly exactly like it, i just would like to draw something like those on the ground!
I already tried using fast-moving particles but the result is ugly and doesn’t respond well to movement!
Any other ideas? Really appreciate any help!
Thanks in advance!

1 Like

One way could be to look into using decals for the indicators.
I am currently experimenting with them so let me share what I’ve figured out so far.

To create a generic range indicator first make a transparent png image:

Then load the png file into UE4 and create a deferred decal material from it.

36963-rangemat2.jpg

Then place the decal in your level. (can be done by simple dragging the material into the scene I believe)

The Result:

Also remember you may have to rotate the decal when placed in your level, I found that all my decals by default needed their pitch rotated by 90.

Here is a link to another answer that might be helpful to you.

1 Like

Hey! This is great but do you have any idea on how I I would make an arrow-like indicator? A circle is obviously a good start but I think an arrow like indicator is quite harder! Especially when you want it to rotate accordingly to the player’s current mouse position!

Well, I’m still working out how to create an arrow like indicator that scales with distance from the player pawn; however I can show you how I solved the rotate to cursor problem.

Right, so for my indicator I made an actor with a scene component and decal component (you can ignore the arrow component and the second decal component, I’m doing something a bit different but the rotation problem is the same).

40295-bluep0.jpg

In the tick event of the actor, we want to continuously update the actor’s rotation to face the cursor. (The calculations for that are done in the custom macro).

Macro Overview:

Here 2 locations (2D vectors) are determined first, the screen location of the actor (our indicator) and the screen location of the cursor. Luckily there are a few handy Blueprint nodes to get these for us.

Now after that I converted the 2 dimensional vectors into 3 dimensional vectors and set the Z for both to equal the Z of the actor. (This isn’t strictly necessary as there are ways to work out the rotation with the 2D vectors, but I’m used to using the “Find Look at Rotation” node)

Next, the rotation is found using the “Find Look at Rotation” node. The rotation is broken so that only the Yaw is used.

Now the next part is important if you have a camera that can rotate, but first see if you come right without it. We need to add the rotation of the camera to the rotation we just calculated for it to be accurate (Note the 180 degrees added, this was done because I found that I was getting the opposite direction to the cursor)

Note: In my case I have a pawn that has a camera component.

Hope this helps you.

1 Like

That seems great! I am going to try it later tonight! Thank you a lot, really helps! :smiley:

Glad I could help. ^^