var tempo : float;
var legno : PhysicMaterial;
var metallo : PhysicMaterial;
var pelle : PhysicMaterial;
var ghiaccio : PhysicMaterial;
var Hit_metal : Texture;
var Hit_wood : Texture;
var Hit_ice : Texture;
var Hit_skin : Texture;
var Hit_skin_part : GameObject;
var Hit_metal_part : GameObject;
var Hit_wood_part : GameObject;
var Hit_ice_part : GameObject;
function Update () {
Destroy(gameObject,tempo);
}
function OnCollisionEnter(collision : Collision) {
if (collision.collider.material == legno){
Instantiate(Hit_wood_part, collision.contacts[0].point.zero,Quaternion.identity);//collision.contacts[0].point.rotation);
}
Destroy(gameObject);
}
But It don't Instantiate the Particle