Posted April 08, 2023 by OctothorpeFSU
Author: Gabriel Alvarez
Issue-
Previously, I added an enemy AI that would patrol an area, search for a player, run towards them and attack them. While the enemy AI worked, it did not do a great job at what it was supposed to do. Due to this, some improvements had to be made to the enemy AI.
Fixes-
While I maintained the same basic functionality of the enemy AI, a lot of the code had to be changed. The enemy still uses Root motion in order to blend its animations with its movement, but the way it knows where to move was completely changed. Furthermore, their animations were also fixed and some of the major bugs, such as rapidly spinning in place or patrolling to an area that they could not move to were also changed. Finally, since the enemy AI base was finally functional, I decided to start making the AI for another one for another one of the enemies. This enemy is called a Seeker, which unlike the regular enemy does not target the player when the player enters their field of vision, instead it will target the player if it "hears" them. To simulate the player's sound, the player emits a sphere whenever they move. This sphere is based on their velocity and if the sphere enters the enemy's hearing radius, the enemy will target the player until the player exits the hearing radius for some period of time.
Added/Updated items below-
Later updates will add -