Camera not following player.,Camera not following player...

hi, i tried to make my camera follow my player and it worked, but then i tried smoothening it with a Lerp but now it only looks at the player. Here is my script.


using UnityEngine;

public class CameraFollow : MonoBehaviour {

    public Transform target;

    public float smoothSpeed = 0.125f;
    public Vector3 offset;

    private void FixedUpdate()
    {
        Vector3 desiredPosition = target.position + offset;
        Vector3 smoothedPosition = Vector3.Lerp(transform.position, desiredPosition, smoothSpeed * Time.deltaTime);
        transform.position = smoothedPosition;

        transform.LookAt(target);
    }
}

A very easy way to do this - would be, and try this, take the camera object, with your cursor, drag it over the player object, so the player camera becomes a child of the player, that way itll automatically follow it. Hope that helps