How to detect a collider in a particle?

Hello community.

I need to know how I can collide a particle with a GameObject with some detection collider added on it.

Example:

I’ve an enemy who’s shoot is a constant particle. And I need to collide it on my player.

I’m completely lost, what method can I use?

Thanks in advance.

Regards.

How complex is the particle? Can it be characterized as a ray?
Don’t try to do collision per particle that is being emitted. That is completely overkill!

Rather incase your particle in some basic primitive collider. If you only care about direction collision use a Ray, if you care about linear spatial collision use a capsule. Just play with which geometry suits your needs.

Assuming you’re using a Shuriken Particle System, you would use OnParticleCollision.

http://docs.unity3d.com/ScriptReference/MonoBehaviour.OnParticleCollision.html

I’ve done some checks with documentation and it doesn’t Works.

The thing I’m trying to do is:

I’ve a group of particles in one particle system. Those particle systems are shooted by an enemy.

And I want it to those particles have effect on my player like a collision with some detection but it doesn’t Works.

I’ve configured the “void OnParticleCollision(GameObject other)” by tag, but in practice it doesn’t collide with player.

I’ve set the colision on true, on inspector. And it do nothing at all.

I’ve tried to add a box collider or something else but it says is to small to detect it.

I’m using 2D settings for colliders.

Any tips? Thanks for the help.