i want to make a teleporter device follow a player and stay infront of them i tried using GetViewLocation() but i realised this wasnt the correct method as it gives you coordinates of tthe camera not the line of site
Try to use get forward vector or if you want it to be more complex use forward vector with linetrace or Vinterp to. I can’t explain it because is too complicated, so if you want you can watch a tutorial but you can do it simply with get forward vector.
Here is an example of how forward vector can be used
This image is just an example, don’t straight copy it like it is
If you just want the direction the player is facing, then you can just use GetActorForwardVector, which is available on all actors. If you want the location the player is focused on, you need to get the PlayerController and then call the GetFocalLocation method.