I'm with a problem and I need some help, because I'm on early learning of gaming and Unity, and i want to learn doing it, so, i need all the help, you developers know how each little help, helps a lot!!

I found the answers of these questions in here, but they don't work properly together or i don't understand it how it works to put it on my code;

I'm building a mobile game and i need the camera to follow the character, i found how to do it, but the thing is: the stage is a 4:3 kinda stage, that repeats again and again and again(well, that's the idea, i still don't know how i do this), but, when the player goes to the groud, the camera is still centered on the character, so it continues following it, but there's no more stage, then nothing appear in there, but i want the camera to doesn't follow the character when it's already on the Y border of the stage. Can someone light me with the google searching with this?

Exactly like this: https://www.youtube.com/watch?v=ETxoUDWCBvE

And how i can do the stage repeat in a looping? I though in make the scenario move instead of the character then make it loop with a technique i saw in some Flappy bird clone video, but i don't know how the camera would work.

I want to know how i can start doing these.


Ps: Unity 5 ;-;

That's what happen with the camera:


  • \$\begingroup\$ you could simply make a prefab of the background it and recreate it depending on where you are moving so that you never see the blue background color. Also you would have to delete the previous "backgrounds" so that you don't end up with thousands of game objects. I guess you only need 2 at a time. \$\endgroup\$ – dimitris93 Apr 7 '15 at 9:30
  • \$\begingroup\$ That's what i want(but not on the Y axis when the camera got on the bottom or in the top). But how do i loop the entirely prefab, and not just the image? Because the prefab have also the platforms that needs to loop \$\endgroup\$ – assisrMatheus Apr 7 '15 at 12:39
  • \$\begingroup\$ Like this: youtube.com/watch?v=HrDxnMI7pCc. Loop only on horizontal, but not only the background, but with the prefab and all its elements, floors, enemies, everything. \$\endgroup\$ – assisrMatheus Apr 7 '15 at 12:47
  • \$\begingroup\$ so make a prefab with "all its elements floors enemies" then. make a game object, drag everything in that object, and create prefab of that object by dragging in in the assets folder \$\endgroup\$ – dimitris93 Apr 7 '15 at 12:48
  • \$\begingroup\$ I did that, but how i loop everything? my hierarchy: puu.sh/h4KJO/c6e382ade3.png, i put everything of the stage object in a quad object and i did loop it like in the video, but it only rotates the image i set to the quad obj and not everything \$\endgroup\$ – assisrMatheus Apr 7 '15 at 12:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.