I was also thinking about that, but in this example it divides the width of the player by 2. So when more than half of the player is outside the corner, it passes through and is no longer blocked (see picture below). As I understand it, this is because the half of the player’s width is not blocked since it’s divided by to. When I remove / 2, it blocks all the width on one corner fine, but on the other corner it stop blocking when just one pixel are outside the red color.