Collisions are driving me crazy

Hi everyone...
...so I have another problem I can't figure out :-/
This time it's about collisions...
So, I have something like an empty box with walls around. In this box, I have a square actor 40x40 pixels. If I make the box rotate, the actor simply falls on the Y axis. So far everything works great.
Now, I put an instance of the walls used around the box, INSIDE the box itself (as to create an obstacle). Let's say that even this obstacle is 40x40, and that I position it exactly leaving 40 pixels from the walls around the box.
What is happening now is that, when I rotate the box, and the main actor falls, it just doesn't pass through the 40 pixels left empty between the external wall and the obstacle.
I understand it's because it collides with the corner of the obstacle, so that I should leave, let's say, 41 pixels to make the main actor fall, but I'd really like to keep everything built with block of 40x40 pixels...Anyway, leaving 41 pixels couldn't resolve the problem, since making a lot of rotation the main actor could get to a position with the same "corner" problem...
I hope it's quite clear to understand...I'd post an image, but I don't know how to do it...
Thanks anyone
...so I have another problem I can't figure out :-/
This time it's about collisions...
So, I have something like an empty box with walls around. In this box, I have a square actor 40x40 pixels. If I make the box rotate, the actor simply falls on the Y axis. So far everything works great.
Now, I put an instance of the walls used around the box, INSIDE the box itself (as to create an obstacle). Let's say that even this obstacle is 40x40, and that I position it exactly leaving 40 pixels from the walls around the box.
What is happening now is that, when I rotate the box, and the main actor falls, it just doesn't pass through the 40 pixels left empty between the external wall and the obstacle.
I understand it's because it collides with the corner of the obstacle, so that I should leave, let's say, 41 pixels to make the main actor fall, but I'd really like to keep everything built with block of 40x40 pixels...Anyway, leaving 41 pixels couldn't resolve the problem, since making a lot of rotation the main actor could get to a position with the same "corner" problem...
I hope it's quite clear to understand...I'd post an image, but I don't know how to do it...
Thanks anyone

Comments
After hours and hours, I resolved just changing the collision shape from rectangular to circle...
Hope this can help others experiencing this issue