How to add blood splatter effects to enemies in Unity

Let’s go over how to add a blood splatter effect to enemies when they are shot.

I have previously shown how to set up the shooting in this article.

First, create or download the effect from the asset store:

Open up the script. Add a serialized for the blood effect:

Update the function to check if you hit an enemy. If an enemy was hit instantiate the effect at point of impact. To prevent the effect from instantiating inside the enemy add the hit normal multiplied by 0.1 . The value of the hit normal is 1 so if did not multiply it by .1 the effect would show up one unit outside of the enemy. Use to rotate the effect outwards:

Lastly, add the effect to the script on the inspector and ensure the tag is set on the enemy:

Good luck!

Unity / C# Game developer