How to improve my A* algorithm?

Hey,

I’m using the A-Star algorithm so that enemies can find pathes to the player, so that they can attack him.
The game is 2D and tile based, but uses floats for entity movements that means you can be on two tiles at the same time. Every enemy has a hitbox and obviously a X and a Y coordinate. The X and Y position of the enemy is usually top left of the hitbox, that means that the path which is determined by the algorithm has it’s origin is on the top left of the hitbox. That’s fine so far and the algorithm works.

However the problem I’m encountering is that right now I’m only determining the path for one point to another (that’s in the nature of the algorithm I guess) but I’m not considering the whole hitbox attached to this point. Since the x/y point of that enemy is on top left it’s possible that the algorithm thinks that it’s one tile ahead, however the whole sprite and the hitbox is still one tile below.

Image for clarification:

The red circle around that blue point shows where the x and y of that enemy is.
Obviously it’s above the white obstacle. So the enemy tries to move left. The problem right now is that the whole hitbox and the sprite is below and therefore can’t pass the obstacle since it had to move one tile up (where the blue point is).

Instead of the X/Y point of the enemy I used the center of the hitbox as parameter for the starting point of the A* but that caused and even more akward behavior.

So I need a solution where my a* algorithm not only uses one point but a whole hitbox to determine a path.

I’m thankful for any advices!