My Focal Point doesn't exactly copy my players pos (How to fix?).

So, I have a focal point for my camera, and it follows my player around using the code below. But, it doesn’t exactly follow it for some reason, which creates a bad sliding effect for the player where it slides forward. How do I fix it?

 void Start()
    {
        player = GameObject.Find("Player");
    }

    // Update is called once per frame
    void Update()
    {
        transform.position = player.transform.position;

        transform.rotation = player.transform.rotation;
    }

Here is an image to show what is happening. This image shows what usually happens when the player is moving. The blue capsule is the player, and the green border sphere is the focal point.


Can Someone help me stop this extra sliding?

I guess you are trying to create a First person camera?

In this case you also have to reset the localPosition and the localRotation of the camera to (0,0,0,) and Quaternion.identity. Looks like it has a little offset at the moment.

Also in your screenshot the FocalPointXYZ script is disabled, but i guess that’s by purpose during debugging?