Teleport In view range

Hey i Want to implement a Feature into my ue5.4 game. The feature is that the actor teleport in the view range of the player and the player needs to quickly look at it and when looked it teleports again but i really cant wrap my head around it on how to make the actor teleport in the view range does anybody have a idea?

You could use a line trace from the camera, and teleport the actor to the hit location. It would be something like get camera, get forward vector, multiply that by a few thousand, plug that into a line trace, get hit location, plug that into get random location in navigable radius(with an radius of like 25, then set actor location with that output.