Hi, im working on a game where you need to dodge asteroids that fall from the sky. I made a random spawner script with empty game object. from a youtube tutorial. Now I dont know how to destroy asteroids when they collide with the ground. Im new at making games. I tried many diferent options.Puting destroyer scripts i found online in the spawner script, didnt work. making a new script and adding it to my asteroid prefab, didnt work. I dont know what to do. im using this script as a destroying script :
public class Destroyer : MonoBehaviour
void OnCollisionEnter(Collision other)
If anyone can help me i would be very grateful!