Detecting when a shuriken particle collides with a GameObject

I’ve created a basic casting system where I can cast a spell on a target. When I cast a spell it instantiates a particle effect, and on every update it uses Vector3.MoveTowards to move towards its target.

The problem I’m having is figuring out the best approach to handle instantiating a separate particle effect when the spell impacts its targets.

So, in short, what I want to do is:

  1. User casts spell
  2. Spell moves towards target
  3. Once spell reaches target the spell particle effect is destroyed, and a blood ‘spew’ particle effect is emitted from where the particle collided with the target object.

Anyone have any advice on how best to approach this?

Thanks!

Do you simply want to detect if the Particle System GameObject hits the target, or do you want to detect if a particle from the Particle System hits the target?

The first is easily done with colliders and the function OnCollisionEnter, and the other is done with the OnParticleCollision.

I recommend the first one.