0
\$\begingroup\$

I have a fire particle system in my game. I want to over the game when player collides/triggers with that particle system. As I've researched for this on google, I came to know that I can use World Particle Collision component for that. By sending Collision message on colliding, collision can be detected. I've put following snippet in player's script to detect particle collision.

void OnParticleCollision(GameObject TargetedParticle)
{
    Debug.Log ("Collided with particle");
}

Am I doing this in a right way? Because This code is not enable to detect collision. Help me please.

\$\endgroup\$
1
  • 2
    \$\begingroup\$ do you have "detect collision" enabled on the particle effect? \$\endgroup\$
    – Gnemlock
    Commented Sep 1, 2016 at 8:53

1 Answer 1

1
\$\begingroup\$

The player object should have a rigidbody collider. Enable the 'box collider'.

The 'Send Collision Message' should also be enabled in the particle system dropdown(under the collision tab).

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .