I have a script:
using UnityEngine;
using System.Collections;
public class CameraMovement : MonoBehaviour {
public Transform target;
void Update () {
gameObject.transform.position = target.position;
}
}
But, nothing ever renders even with sprites on the screen. Any ideas?
you’re setting the camera location to the target location.
you should set it to new Vector3(target.position.x, target.position.y + 10, target.position.z). and make sure it’s facing down. otherwise you’re inside you’re target.
Cherno is pointing out the near clipping plane. if set to 0.3, anything closer than 30cm to the camera will -not- draw. you can turn that down, but it’s better to back the camera up.