My problem is really simple: I have a prefab that I need to instantiate every second. Those platforms are in a row and are destroyed by a destroyer. The code is really simple (and surely stupid):
public class StartSpawnScrpt : MonoBehaviour {
public GameObject obj;
// Use this for initialization
void Start () {
Spawn();
}
void Spawn(){
Instantiate(obj, transform.position, Quaternion.identity);
Invoke("Spawn", 1);
}
}
This code is attached to a spawner that is attached to the moving main camera. The problem is that after the first spawn call, next are translated downwards and I really can’t figure out why.