using System.Collections; using System.Collections.Generic; using UnityEngine; public class CameraController : MonoBehaviour { [SerializeField] Rigidbody2D _player; // Start is called before the first frame update void Start() { } // Update is called once per frame void Update() { gameObject.transform.position = new Vector3(-3.5f,_player.transform.position.y+1,gameObject.transform.position.z); } }