using UnityEngine; public class PlayerCamera : MonoBehaviour { public Transform player; // Start is called once before the first execution of Update after the MonoBehaviour is created void Start() { } // Update is called once per frame void Update() { Vector3 PlayerPos = player.position; PlayerPos.y = 0; PlayerPos.z = -10; transform.position = PlayerPos; } }