2D destruction? help?

I’m making a rts spaceship styled game i have a sprite (form unity 4.3) of my spaceship and a sprite of a meteor. Right now i have the meteor crashing into the spaceship but i want some kind of random shaped radius (depending were the meteor hit) to change the texture to a more broken looking way but i also want some pieces of the part it hit to fly into space, kinda like if a wreaking ball hits a building it turns to pieces. I tried this by getting an object and making that get destroyed but it doesn’t look good. I have no idea how to even get started, sorry if the question seems vague but like the title says i want some kind of 2D destruction.
Thanks in advance.

Here you can find detailed video tutorial with start and end assets:

You could add an explosion force to rigidbody2D (you should have several object parts then) or change the texture to a random one from a list of broken textures and spawn a couple of small items to fly in (random?) directions.

Alright I’m a little confused about your question, but I’ll do my best. This coding is in C# by the way.

Create an empty game object that is placed where the space ship is. Then add a script to it that does this.

So to destroy the object, the best way I’ve found is to create a variable to hold the object:

public GameObject spaceShip;

And then when a collider enters it with the tag “Meteor”:

void OnCollisionEnter2D (Collision2D col){
		if(col.gameObject.tag == "Meteor"){

You would destroy it:

Destroy (spaceShip);

Then you could maybe create a game object such as an explosion game object, to replace the space ship and make it look like it’s blowing up. So back at the top, create another variable called explosion:

public GameObject explosion;

And then, after the space ship has been destroyed, create the explosion object in the same place as the empty game object (which should be placed where the space ship was):

Instantiate(explosion, transform.position, transform.rotation);

You will also want to make sure that the explosion object destroys itself after it is spawned, you’ll probably want to do that in another script.

I wrote this in a hurry, but if you want to use this method and are having trouble getting the script put together, just leave a comment and I’ll see if I can help you out.