How to add camera and movement borders
I am making a simple side 2d scroller game, where the camera follows the player only in the x axis (so if he jumps, the camera will not move). I am trying to make it so that the camera can follow the player, but at a certain moment stop following him (lets say the end of the map, but in such a way that is is not visible that the map is over). The player from there can keep moving, even though he is not in the center of the camera anymore, until he reaches that border, which is not in the very left in screen. Then the player can go back, and the camera will only start following him again, when he gets back to the center.
Thanks in advance. I know it sounds confusing so ask me any questions you might have.
Answer by jayjf · Sep 03, 2015 at 09:51 AM
Did you try the Standard Assets?
There are scripts for controlling the character and for the camera. Try the scripts PlatformerCharacter2D and CameraFollow. These should help you do what you want.
You can find these under Assets>Import Package>2D
Your answer

Follow this Question
Related Questions
Unity: How to move the Camera by a certain amount? 1 Answer
Switching player controllers 0 Answers
Camera Follow Script destroys Raycast on VR-Hands with Late Update 1 Answer
Camera moves impossibly fast, and can't see any object 1 Answer
How to set Camera Limits in Unity that would stay accurate for different screen ratios? 2 Answers