Sprite appears on the opposite side of screen

In a scenario that a 2D sprite is moving cross the screen edge, then it appears from the opposite side of screen.
For example, the shooter game: “Space Shooter”. When the plane is moving on horizontal, it may collide the left of right side of screen, then I will cross the edge and appear from the other side.

How to implement that effect?

The detail point is when half of the sprite has been cross the screen. The crossed part has already appear from the other side.

Best way I can think of is when your player starts leaving the screen on the right side, clone him and instantiate the clone on the left side of the sceen. Both players now follow your controlls. If one of the players copletely leaves the screen destroy him.

If I need to go into more detail please comment.

Good luck! :slight_smile: