Why does not my particle system collision work?

Rox picture Rox · Oct 14, 2015 · Viewed 8k times · Source

I have added a particle system where I have checked the collider option and added a world particle collider. See the image below.

In the script that is attached to the particle system I have:

void OnParticleCollision(GameObject other) {
    Debug.Log("Particle was hit!");
}

The bullets that are fired don´t seem to hit the particles since the above message is not printed. The bullets are spheres with a sphere collider and a rigidbody attached. The rigidbody is set to non-kinematic (the checkbox is not checked) if that matters.

Also, the bullet object has a script attached with the same lines as above:

void OnParticleCollision(GameObject other) {
    Debug.Log("Bullet was hit!");
}

But it is not printed as well.

What am I missing?

enter image description here

Answer

Serhii Hubankov picture Serhii Hubankov · Oct 15, 2015

Check if you have "Is trigger" disabled on Sphere Collider, or you're particles too small and don't hit the actual collider. Tried to simulate your situation, all works fine.