Today we'll talk about a new enemy feature: strafing.
During combat, enemies may enter this state, analyzing how to attack you. This can be a good opportunity for you to attack, but be careful; if you close the distance, they might attack you.
To make lateral movement as realistic as possible, the game calculates whether there are any collisions in the direction of movement and whether the AI can trace a path from its current position to the target. This is represented by the red sphere.
The duration and direction of strafing are completely random each time the enemy decides to use it.
This feature is part of a series of AI improvements I'll be implementing during game development, so that each enemy has its own unique characteristics and behaviors.
Play and support the game on Patreon or Subscribestar

