cnam-geometry-dash/Assets/Scripts/CameraScript.cs

13 lines
386 B
C#
Raw Permalink Normal View History

using UnityEngine;
public class CameraScript : MonoBehaviour
{
public GameObject playerObject;
public void Update()
{
transform.position = new Vector3(playerObject.transform.position.x, transform.position.y, transform.position.z);
// transform.position = new Vector3(player.transform.position.x, player.transform.position.y, transform.position.z);
}
}