Player Wraparound
Mar 26, 2021
The first game that comes to mind when it comes to wrapping is Pac-Man, where if Pac-Man leaves the screen on one side he will show up on the other. This game mechanic does add to the strategy of the game. With my Space Shooter 2D game, I first want to explore player wrapping on all sides of the screen.
The idea is to check the current X & Y position of the Player and compare it with a X & Y coordinate that is off-screen, which will act as a threshold. If the Player pass that threshold, we just need to set a new Vector3 to pop them on the other side of the screen.