- Home /
Question by
karthickoxygen · Jan 01, 2015 at 08:14 PM ·
screenedges
How to move Gameobject across the screen edges like in snake game
Hi,
I want to achieve the below concept in Unity.
Assume that the game is happening in a 2D square. When the player object hits one edge of the screen, He has to appear from the opposite edge. I have seen this in the classic snake game where the snake will be able to keep moving in the same direction when it is not interrupted by obstacles.
I have plans to proceed building this concept by placing colliders at the edges and creating a new game object from a other end with same position, direction & velocity.
I wanted to make sure if any other effective way to achieve this.
Please advise.
Thanks, Karthick.
Comment