Hello Unity-Community!
I am working on a 2D game (beginner level) and I have the following problem:
The camera is following the player. When the camera reaches end of map it shouldn’t go beyond borders of map (but the player is allowed to reach until the border). When the player go then away from the borders the camera should continue following. Also I want to deactivate the camera movement when the player jumps (until the end of the jump animation).
I don’t know how to solve this problem or where to start, any ideas are much appreciated!
I’ll give you a general - non code - example.
Set up a collider for the camera at the end of the level. When the camera collides with this collider change the parent of the camera from the player to an empty game object - or to itself.
If the player moves away a specified distance from the end of the level - re-parent the camera back to the player.
About jump - do you want the camera to follow the player on X but not on Y. You could do this in code I’m sure. Just don’t inherit the Y motion of the player when he is jumping.
Those will probably get you moving in the right direction.
A programmer dev may have better processes to do these. 
(This tutorial is not made by me)
2 Likes
All right, thanks to both of you, that gave me some ideas! working on the implementation now…