I'm sure this has been asked before, but I couldn't find the thread. Let me know if you can locate the duplicate.
So, I have a my level is an array of tiles, where a tile can either be solid or walkable. I then use A-star to path-find my enemies from one location of the floor to another.
The issue is that I also have solid entities. As an example, I may spawn 3 breakable vases at a certain location. They can be larger or smaller than a single tile, and they are just objects in the world, not tiles themselves.
Because they are not a part of the A-star grid (can they? they're larger or smaller than a tile, and their position is not locked to the grid), the path-finding is not aware of their existence, since it only operates on its grid. As a result, sometimes the chosen path for the enemy to follow flows through the solid vases, so the enemy just gets stuck at that location.
Is there a solution that alleviates this problem? I want the enemies to path around the vases (until they're destroyed, of course), instead of just getting stuck trying to unsuccessfully move through them.