How could I get the current target in a first person view?
I would like to know how can i get the current target in a first person view. I have a crosshair, and how can i get the actor i am looking at? Is there a built in function or i have to loop through all actors and find the closest one?
Use "Single Line Trace For Object".
You can set "start location" as camera location, end location as "camera's forward + 100000 (the length of Target Searching)
And there is a return value called "OutHit"
Spilt it and you can see "Out Hit Hit Actor". this is what the trace hit.
answered Jul 26 '14 at 05:49 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here