- Home /
 
 
               Question by 
               Dext · Jul 06, 2014 at 06:22 PM · 
                collision detection  
              
 
              OnParticleCollision doesn´t work
Hi Guys,
I made a fire particle system. I want the fireparticles are able to recognize the collision and then set the gameobject that is hit by the particles on fire. I used the void OnParticleCollision but it doesn´t work. Here is my script attached to the Gameobject and to the particle itself
 using UnityEngine;
 using System.Collections;
 
 public class hallo : MonoBehaviour {
 
     // Use this for initialization
     void Start () {
     
     }
     
     // Update is called once per frame
     void Update () {
     
     }
 
 
     void OnParticleCollision(GameObject other) {
         Rigidbody body = other.rigidbody;
         if (body) {
 
             Debug.Log ( " HuhuPartikel!" ) ; 
 
         }
         
         
     }
 
 
 
 }
 
 
               I added the component World particle collider and checked the send collision mes...
               Comment
              
 
               
              Your answer