AI Glitch

Hello all, the enemy in my game are supposed to chase the player, but when the player is up against the wall behind a corner, they run into the wall and keep going along the y instead of going to the X to the player's coordinates, only when the player moves when this happens, the enemy starts chasing it, but if it stands still, its like it doesnt exist. I've gone through my code and i have no idea how to get around it, or if its even possible to get around it, i need help figuring out what to do

Comments

  • Oleg32sOleg32s Member Posts: 10
    i have just now realized the problem is that when the enemy runs into the wall, it loses its x velocity and for some reason stops tracking the player until he player moves again, is there any way to work around this?
  • ApprowApprow Member Posts: 703
    @Oleg32s
    is the enemy only activated when players velocity is more the 0 or less the 0?
Sign In or Register to comment.