Hi, i’m new with unity, i’m trying to create a simple 2d game, a space-shuttle must not hit asteroids by moving up and down. But when I move the camera in the direction of the spacecraft I don’t see the spacecraft.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class spostamentoCamera : MonoBehaviour
{
public GameObject astronave;
void Start()
{
}
// Update is called once per frame
void FixedUpdate()
{
Camera.main.transform.position = astronave.transform.position + new Vector3(9,0,0);
}
}
this is what i see
How can i solve this?
