Collision Sides

What is the "official" way of detecting what side a box collided with?

The code I have right now uses a combination of the world collision point and normals. It's worked for me, but it will fail if rotations/slopes are involved. If I were to address those special cases, it would be a little more work to figure that out.
Well, going from the assumption your slope is a triangle you would have to first check with what kind of object you are dealing with.

this kind of triangle:
/ |
/ |
/ . |
/ |
----------|

so in pseudo:

Code:
if(objectype = "triangle")
{
if(objectcolliding.x > triangle.x+objectcollidinghalfwitdth)
{
//right
} else if (objectcolliding.y >  triangle.y+objectcollidinghalfheigth> )
{
//bottom
} else {
//slope
}
}


for rotations: my math brain is giving up on me right now but what you have to do is the following:
Take the x and y of the collision and reverse them the amount of degrees (box2d uses radians) of the object colliding.

Maybe if no-one else answers I will look into this tonight.
PRE_SOLVE's contact impulse is a common way to detect which direction a contact is pushing, which should indicate which side too.

Original thread: https://box2d.org/forum/viewtopic.php?t=5079