Nerd For Tech
Published in

Nerd For Tech

Creating Bullet Splash Effects in Unity

I am creating a third-person survival game. I have created the shooting system and am now going to explain how I have created the blood splatter effects for the bullets.

To start I will go through the steps of restructuring the attack collider to get the effect to work correctly. You will want to create a new empty game object and add the attack collider to this game object. This game object will be a child of the enemy game object.

Create a script for the enemy attack and add it to the game object with the attack collider.

This script will control the state that the enemy is in by calling public game objects from the enemy AI script.

Enemy Attack Script
Public Methods

Now I am ready to add the blood splatter effect.

First I used the Filebase package from GameDevHQ to pick a blood splatter effect.

In the shoot script where I call the damage method for the enemy, I instantiate the blood splatter prefab at the hit point of the raycast. You will want to tell the raycast to only detect the layer your enemy character controller collider is on. You will then want to set the blood splatter effect to destroy itself after a set amount of time.

This will create a blood splatter effect when the enemy is shot.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store