Using OnCollision Spawning Prefabs

Guys, I am having an issue with planning an event in my game and need some input. I have a scene in my level where the player is running down the street and there are meteors dropping from the sky around him. Once these meteors collide with the ground they explode an a small mob of aliens emerge from the explosion and that’s when the AI takes over.

My problem is that I am wondering whats the best and least expensive way to go about this? Here is a super dirty script idea I have:

var landed = false;

function OnCollisionEnter(collision : Collision) 
{

landed = true 

 if ( landed = true )
   {  
   deploy() ;     
   //spawn enemies
   }
}

now how do I go about adding camera shake once a meteor flies over the player before it hits the ground? Do I somehow calculate the distance from he player and trigger it once within a certain proximity and shut it off when it leaves? Also, is creating a crater after the explosion too much work? If not I need help with that as well.

I think it’s better to use transform.position if the ground in your game is flat. So you can just calculate the height of the meteor, ie the y component, and when it reach ground level, such as y = 0, then trigger the explosion and spawn the enemy etc.

Thanks, I didn’t even think of that…

so is it best to destroy the meteor and replace it with a damaged ship with rubble abound it(prefab model not from the actual terrain) or use terrain deformation?

Android