In the current version of the enemy attack AI we have developed in unreal engine 4 for our melee combat system, all they do is when ever they see an enemy, they run to the enemy and start attacking. They don't consider factors like the distance from them to the enemy when they are in fight. So, today I am going to implement a method where they calculate the distance from them to their enemy and only if the enemy is withing the hit range of their melee weapon, they will launch the attack.