If an actor goes off the screen, how would you spawn it on the opposite side? [2D Game]

Picture an asteroid game. . . The ship flies off the screen and reappears on the opposite side with the motion, direction, and speed still applied. How would someone implement this in unreal? I’m having some hard times trying to figure this out.

Any help would be greatly appreciated!

Hi Illuzioun

You have position and direction of your little spaceship, once it would leave the game area simply use these two to calculate the other intersection point of your movement vector with the game area rectangle and teleport your ship there…should be sufficient :slight_smile:

Any chance you could be a little more specific for me? I’m still in the learning process of BP. :slight_smile:

i’ve been playing with things but I can’t seem to get it to work.