Particle Collsion with a separate object

Hey Everyone,
Is it possible for Unity 3.5 particle systems to “collide” with other objects? For example, if I have a flamethrower that is emitting a particle system, can I use the “OnParticleCollision” function to see when it collides with an enemy? Currently, I can’t get it to work. I’ve done a bunch of reading on this and it looks like it’s not possible anymore (it used to be possible with pre-Unity 3.5). Is it possible? Or perhaps there is another function other than “OnParticleCollsion” that I can use?


I still use the legacy particle system, and and I think it’ll work for what you want to do.

First, I made sure that my particle system had a World Particle Collider component and that “send collision message” was enabled.

Then I created a cube with a collider and rigidbody, and made the particles move towards it/

Added this script to the particle system to make the box get pushed back every time it got hit by a particle.

function OnParticleCollision (other : GameObject)
    var body : Rigidbody = other.rigidbody;
    if (body) {
        var direction : Vector3 = other.transform.position - transform.position;
        direction = direction.normalized;
        body.AddForce (direction * 5);

You could just make it subtract health or run some function on the player.


Tell me if you’re still having problems.