using System.Collections;
using System.Collections.Generic;
using Unity.VisualScripting;
using UnityEngine;

public class CameraFollowPlayer : MonoBehaviour
{
    public Transform player = null;

    private float startY = 0;

    void Start(){
        startY = transform.position.y-player.position.y;
    }

    // Update is called once per frame
    void Update()
    {
        transform.position = new Vector3(player.position.x, startY + player.position.y, player.position.z);
        transform.rotation = player.rotation;
    }
}
