How to: Moving an object through one side and appearing on the other side

Hello, I'm creating a game where an object can be moved through one side of the phone and appear on the other side. I want it to look smooth, so I do not want to just say: if you hit the right side, then go on the left side. If for example 30% of the object is outside the right edge, then we should see 30% of the object on the left side. A good example is the Rubik Squared game (here's an image) where you see on the middle line, we see a part of the blue square on the right and the other part on the left.

I'm sure there might be many ways to do this, but if someone can provide some, it would be nice. A piece of code would be appreciated.


Best Answer


Sign In or Register to comment.