2D Screen Wrapping

I am trying to make a 2d game that has a space ship that can go in both the x and y axis. The problem I am having is if the player goes off screen they can’t see where they are going. My goal is to have the player wrap over to the other side of the screen. I have tried to use trigger boxes on each side but then I get a weird whipping back and forth from each side and it doesn’t look smooth.

With this being 2D I am having a hard time to find information. I know there should be a different way to do this without triggers so that it becomes more smooth of a transition.

Thanks for your help

I’m relatively new with this, but it sounds as if your camera is not following the player?

If that’s the case, I’m thinking you may have a “camera” or “camera spring arm” issue.

By reading this I didn’t think using trigger volumes was the way to attack this problem, unless maybe I’m missing something?

This is a good question. :slight_smile:

I’d probably create a duplicate ship that, when you cross the edge of the screen, appears from the opposite side of screen and once the original ship leaves the screen entirely it is destroyed and this new ship becomes the main one. In this approach, you register hits from both instances of your ship.

You’ll probably have to do this for each object that can cross screen border (e.g. does not move strictly vertically).