I'm working in XNA (C#), & after successfully making my character slide along walls (character represented as a BoundingSphere & wall as a BoundingBox) I've been strugling to solve the well known corner problem.

I've been decomposing the BoundingBox of the wall (AABB) into Planes in order to check which one was hit, descard the further ones, try to work with normals & push the player somehow away from the corner direction (in case it hits the outer part of a corner).
The problem is that there are plenty of different possible situations...

I manage my walls as BoundingBoxes, & each wall is one of them. So in a corner there are 2 BoundingBoxes which come very close one to the other. So there are many planes (outer & inner) that may be hit, from both BoundingBoxes. It's actually very difficult to manage many planes of many BoundingBoxes & get an algorith (which works for inner corners: you are indoors, & outer corners: you out outdoors).

I'll try to show my issue in a pic (seen from above), & I'd like you to help me in thinking about a solution. Is it a mistake to decompose the BB into Planes & work with them individually? (maybe I'm complicating things too much...) May I cast rays...? May I treat the corners with a fixed resolution?
I hope you can guide me somehow, I've really spent a lot of time thinking about solutions & they always match a new case in which they won't work.

Thank you so much,
Synth

P.S.: Oh, I also have an annoying problem in which when I slide along a wall I can see the interior of the "room" (I see across the wall) & I'd like to get rid of this in an elegant way...!

Thank you,
I think the case of the sphere completely inside the box is almost impossible (the wall should be very thick & the player should move very quickly), but I'll analize the other case together with the info you linked. It seems pretty much interesting.