Hello, if that arrow helps you just to know what’s in front of the player just use GetActorForwardVector, if not, I can’t give a clear answer on that side.
To know what’s in the front of the arrow or what you are using for the direction, you could do a raycasting to find targets and see which one is the closest one
Simple logic for Raycasting:
- Get Actor Location (Start Point).
- Get Actor Forward Vector, multiply by desired distance, add to Start Point to get the End Point.
- Line Trace by Channel with Start and End Points.
- Branch (to check if the line trace hit something).
- Break Hit Result (to access hit details).
- Perform your logic based on the hit (e.g., check if the hit actor is an enemy).
Further adjustments may be needed to make it work, hope it helps