I am creating a targeting system and when the player locks onto an enemy I want to create a visual which would be a line that arcs in the air or is visually drawn from the player to that character. I also want the line to have a more faded look at both ends so that it’s not completely touching the actor visually.
Does anyone know how I should go about starting this? I thought about simply using Line Traces that would be aimed at the locked target (stored in an actor variable within the player) but I want something a little better visually.
Another thing to keep in mind is that the line should stretch and retract based on the distance in between.
I feel like this may be possible through materials or maybe the particle system.
First make that line trace working, for debug purposes. Make sure start and end are exactly where you want them to be (ie. a bit far from start and target actors).
Then make beam emitter. And either make emitter in such way it starts a bit from start and ends a bit before end.
Or spawn 2 invisible dummy actors for emmiter start and end, then just move those actors and show/hide beam emitter.
There is 3rd way: you directly specify locations of start and end for emitter, but this did not worked well for me.
Thanks! I got it working in the player BP and it targets the closest enemy so that it updates when a new enemy is targeted. Now I have one more question. How could I set this up so that the beam arcs in the air instead of being a flat straight line?
beam emmiters can do arching. Look at beam emitter tutorial.
You need add tangents and strength to end points then add few middle points (segments) and it will arch.