Damage VFX in Unity

Zach Draper
Dec 23, 2022

--

Every game needs VFX. This is part of how the game communicates with the player. One of the most important things to communicate is the player’s health.

Objective: Give the player a damage visual.

Create the visuals as children of the Player and deactivate them.

In the Player script, create variables for if the engines are out and what the engines are.

Create a new method called EnginesOutVisual(). When no engines are out a random engine is chosen. When one engine is out, the other is chosen. Set the chosen engines out visual to active.

Call this every time the player is damaged.

Now every time the Player is damaged, one of the engines will explode. The first engine to explode is random.

--

--