Camera movement

Hi,

I want my camera to follow my player in a 2D game so i putted my camera as a children of player but when I turn my player left, I use transform.eulerAngles to rotate my player sprite but I dont want my camera to rotate too and I don’t know how to do this.

Don’t make the camera a child of your player.

Create a script for the Camera and add it as a component with following code:

public Transform Target;
void LateUpdate()
{
    transform.position = Target.position;
}

Now go back to Unity and drag the player object into the Target field of the script. You are now free to rotate the player without affecting the camera.