In Project Rothera I made a melee enemy that would either stand still, walk to pre designed waypoints or be triggred from an event.
the enemies would agro if the player went into the range of the enemy depending on how the enemy was looking,
but if u got to close behind he would start to attack, also if the player would attack the enemy it agro.
When the enemies are agro they will walk towards you untill they are in attack range and will hit you after the animation is done if you are in the hit range you will take dmg. The enemies take dmg using its collider from physx and play and animation and when it is done it will start going after the player agen.
created with
HTML Editor .