I am currently making a tile based collision system. But I encountered a big problem I can't seem to figure out.
Use the image bellow for reference.
Gray lines represent the border between tiles. White square is void and grey square is a wall. Purple is a collision box and red lines represent the collision tested.
Fig 1. is the way I'm currently testing for collisions. I test for the tiles adjacent to the box.
Fig 2. is my problem. If the box slightly enters a tile in a corner, the collision will not be tested. I see you coming and tell me to test for diagonal collisions. See Fig3.
Fig 3. If I test for diagonal collisions, then if the box slides along a wall, it will hit the diagonal tile and completely stop (green line)
So I'm not really sure what to do at this point. I tried to look for 2D based tile collision detection and resolution, but nothing I found could solve my problem.