How to create particles once an object has collided with another

Hi everyone, i’m kinda new to scripting and have a lot of trouble with it, but I am trying to make water particles appear once a tree has hit water. If there is a way to do this without scripting that would be nice but if not I prefer to use javascript (as I have a little understanding on how to use it.)

Any help would be nice thanks :slight_smile:

Its very simple to do. Here is a code to create particles :

function OnCollisionEnter(collision : Collision)// you can use OnTriggerEnter() also..Depends up on how you want to detect collision
{
	
	if(collision.gameObject.tag == "zombie")
	{   		
		Instantiate( bloodPrefab , collision.contacts[0].point, bloodPrefab.transform.rotation );
		Destroy(gameObject);
    }
}

but for this you need to create particle system and then you will create prefab of it… I want to make blood drops so i have “bloodPrefab”…

For water particle you can go through this link :

http://forum.unity3d.com/threads/48706-How-to-build-water-bubbles-particle-system

If you find my answer useful then please do check mark… Thanks…