I recently have been working on a couple of the states for the ant state machine as well as the new ant animator controller. For the state machine I've been writing up the attack and death states. For attacking the ant has a small delay after which if the player is still nearby they will take damage. I decided to do attacks this way rather than with collision detection due to the fact that we already have a lot of different scripts utilizing triggers and colliders, so I was unsure of how they would interact with additional colliders for attacks. Also I was unsure of how effective the ant's attack would be if it was tied to the collider on its leg based on the attack animation.
The death state was simple enough. Upon entering the death state a timer starts along with the death animation. Then after a set amount of time the ant object will destroy itself (or despawn once the pooler is integrated). Along with that the ant is not allowed to transition out of the death state at all, otherwise it wouldn't be able to die!
I also finished off the animator controller this week. The states for the animator controller mostly mirror the AI states, with a few AI states sharing an animation. The transitions were all set up so that they would change quickly as needed by the AI state machine. Fortunately the AI state machine is also able to easily tell the animator what to do as whenever the AI state changes it informs the animator's state machine what it should be doing. This allowed me to easily set up the animator and integrate the animations Seth made for the ant quite easily.
The death state was simple enough. Upon entering the death state a timer starts along with the death animation. Then after a set amount of time the ant object will destroy itself (or despawn once the pooler is integrated). Along with that the ant is not allowed to transition out of the death state at all, otherwise it wouldn't be able to die!
I also finished off the animator controller this week. The states for the animator controller mostly mirror the AI states, with a few AI states sharing an animation. The transitions were all set up so that they would change quickly as needed by the AI state machine. Fortunately the AI state machine is also able to easily tell the animator what to do as whenever the AI state changes it informs the animator's state machine what it should be doing. This allowed me to easily set up the animator and integrate the animations Seth made for the ant quite easily.
![]() |
| Animator Controller for the Ants |

Comments
Post a Comment