Closed AndyLee-SH closed 4 days ago
Issue Found: The Enemy Sprite would only flip when they were patrolling and not chasing the player. The Flip() method was only called when the enemy was patrolling and reached one of the points they were walking between.
Fix:
To fix this I created a method that would check whether the enemy was moving left or right by comparing their change in their x position. This change would determine whether the enemy was moving left or right. If they changed direction the enemy sprite would then flip. So instead of flipping whenever they hit a trigger, it now constantly checks which direction they are moving and flips accordingly.
Describe the bug When Player disengage from the NPC , and NPC are returning to their original starting point, sometimes it will turn around facing the Player while walking backwards to their starting location.
To Reproduce Steps to reproduce the behavior:
Expected behavior Expect the NPC to face the way they are walking.
Desktop (please complete the following information):