Spawn Actor Outside Screen

G’day!

Heads-up, I am not a programmer, so this might seem fairly basic.

I’ve been fiddling with UE4 for a while, and I am in a situation where I need to spawn an actor (or teleport, depending on the situation) to a random location. The crux here is that I need a location value placed behind the camera, out of view. Seeing as this is a third-person camera unrelated to the actor’s rotation, it’s a bit more complex than I had assumed.

My attempt was using a WhileLoop. I’d spawn the actor to a random point close to the player, convert that point to screen location and use that bool to dictate the loop. The loop would then spawn the actor to a new location, prompting it to check and see if the new location is adequate. Ideally, this would continue until the actor finds a spot behind the player. But no. That’s an infinite loop.

Pardon my lack of screenshots, but is there a good way of doing this? I’m quite lost here. Thank you.

The main thing you are looking for is Spawn actor and then attaching the actor to a component.

Here is a quick explanation http://youtu.be/Q-yvtjaL49M?hd=1