Spider Enemy — Dungeon Escape

Creating my Spider enemy in Unity

Gabe Gomez
2 min readOct 7, 2021

Objective: Go over my implementation of my Spider enemy for my mobile game, Dungeon Escape.

Animation

The first thing I did to get my Spider enemy working is create the animations it will be using for the time being. These animations are its idle animation and its walking animation. The results of these are shown below.

Spider Idle Animation
Spider Walk Animation

Once I got the animations done, I went into the Animation Tree to hook up my animations and prepared them to be controlled with code. Below is a quick overview of my Animation Tree for my Spider enemy.

With this complete, I can now go ahead and create the code to control my Spider’s movement logic.

Implementation

The code I created to get my Spider moving in the scene is very similar to the previous article I wrote on creating my Moss Giant enemy movement. The code I used (not including the abstract class) is shown below.

This gave me the result we see in the gif below.

That is all for today. Thank you for reading the article! In the next article, I will be optimizing code a bit and implementing the movements for my final enemy, the Skeleton.

--

--