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.