AI Help

I don’t want to spam but I really am having trouble with AI chasing the player.
More information on this post as well with a download to a sample of what I have done so far

The problem seems to be that there is no problem, the enemy stop chasing the player because there is no space to move the enemy into the destination without colliding a wall, try this: Move the player into a wall until the enemy stop chasing (get stucked), then slowly move the player out of the wall until the enemy start chasing again, and wait for the enemy to reach the destination, you should notice the enemy fits perfectly in the space and doesn’t overlap the walls.
In other words, as you are doing with the player, add a pathfinding object to the enemy, with a smaller size (I’ve noticed you make the enemy collision mask smaller, but the pathfinding behavior ignores it I guess), or make the T object bigger :slight_smile:

Thanks! It seems that changing the hitboxes and origin of the enemy works for all of the edges of the obstacle except from the bottom. It seems changing the hitbox of the enemy doesn’t change the pathfinding hitbox. Is there a way to fix this? This is what I’ve got now. Also Switching the animation of the Enemy to 1 (which is a 16x16 square works perfectly)
AI (58.9 KB)

I can’t test it now, but as I said, I think the pathfinding behavior ignores custom masks. And as I said, what you can do is increase the T object size, if T has the size of the enemy and you move T away from walls there will be space for the enemy to chase even close to the walls :slight_smile:
I don’t remember the sizes, but try to double or triple the size of T and run it.