Hi guys,
I have a problem here, I have a top-down 2D game here…which occurs inside, a closed map. I want player, to return from opposite side, when going towards edges… I would also, want the camera to smoothly follow him, in the process…
Thanks in advance.
There isn’t a way to set Unity up to get this effect directly but you can simulate it. The easiest way, if gameplay allows, is simply to make a second copy of the playing area next to the original as the edge moves into view. You may actually need four copies onscreen at once if both edges can be visible at the same time. If the scene has many moving characters then you probably won’t be able to duplicate it like this. In this case, you may be able to get the right effect using multiple cameras looking at the scene at once and moving their viewport rectangles to match the edges of the playing area. You might also be able to get the same effect using render textures. Another idea is to keep the main character still and use a procedurally generated mesh to create the impression of movement over the surface. However, all of these techniques can be quite complicated. If you can give a bit more detail about your game, it might be easier to suggest the best approach.