question about particle system

Hi i was wondering is it possible for the particle system to create particles that stop when they collide with a target an example would be a constant laser that when something got in the middle it would stop at that object.

I am asking as i want to make a wepon like in ghostbusters (name will be changed) and i want a particle system to stop when it hits the target monster and not go through

You could use a ray cast to find the distance to first collision from the gun, and then adjust the particle system to that length.