I realize there have been a multitude of questions involving 2D AABB vs AABB collision, but the questions and responses always avoid the simple questions that make it difficult.
To keep things simple, we are going to assuming that AABB1 is a moving(vector velocity and direction known) rectangle that is much taller than it is wide, and AABB2 cannot move and is a smaller square. If AABB1 were to move towards AABB2 from any angle how would you figure out which side of AABB2 it collided with?
Further, when calculating collision depth, I mean the distance it travels into the object on the x-axis and the y-axis. When finding those distances, how would you find what point would you use as reference? From what I can tell, you couldn't just use one point for every collision because with AABB1 (it is much taller than wide), the top left point would be irrelevant when finding the penetration depth on a collision with the bottom right corner.
Another but less important question than the other two, how can you handle an object with a velocity vector with a high enough magnitude to move through an entire wall in one frame. Say a wall is 50 pixels wide and a player is moving 100 pixels per frame, it could jump through the wall without triggering a collision.
If further information is needed to help solve my problems or understand the problem, please ask. I haven't found any post that helps and I don't have enough reputation to post pictures to elaborate in more detail.