How to make the camera NOT rotate with it's father

I sincerely don’t know how to write the question’s title xD

Is it possible to remove\disable the camera rotation when it is following a character?

Just an example:

i have a third person character in a platform game. I created a normal camera and made it the character’s child. But when the character rotates, so the camera does.

How can i disable the rotation? Make the camera ONLY follow the player but do not rotate with it?

Add this to your camera in a script

    void LateUpdate()
        transform.position = Camera.main.transform.position;


That should work.