I have 2 audio clips playing when the OnCollisionEnter function kicks in, I would like to also display a particleSystem, at the position where collision occurred.
Here is the code;
private var beenHit : boolean = false;
private var targetRoot : Animation;
var hitSound : AudioClip;
var chitSound : AudioClip;
var resetSound : AudioClip;
var resetTime : float = 3.0;
var dieEffectsPrefab : Transform;
public ParticleSystem DestructionEffect;
function OnCollisionEnter() {
audio.PlayOneShot(chitSound);
audio.PlayOneShot(hitSound);
Debug.Log("HitSomething");
animation.CrossFade ("dying");
Destroy(gameObject,1);
}