Answers for "spawn particles at the position that you collided unity"

C#
0

spawn particles at the position that you collided unity

GameObject particleSystemPrefab;

void OnCollisionEnter(Collision collision) {     
	foreach (ContactPoint contact in collision.contacts) {   
       //Instantiate your particle system here.
		Instantiate(particleSystemPrefab, contact.point, Quaternion.identity)    
 	} 
}
Posted by: Guest on November-11-2020

Code answers related to "spawn particles at the position that you collided unity"

C# Answers by Framework

Browse Popular Code Answers by Language