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?