Oriented box to box hits have collision complexity beyond the momentum resolution (that’s actually easy in comparison).

For a sphere to sphere collision, the detection is easy, the determination of contact point is easy, and the contact normal, penetration, etc… all easy. Trivially so.

For a sphere to axis-aligned bound box, you have multiple TYPES of collision:

sphere → side, sphere → edge, and sphere to corner. Fortunately, all of these are singularities and once you find them the calculations for the “extra stuff” (normal, penetration) are straight forward.

For an oriented box to box collision, you have even more types of collisions:

surface to surface, surface to corner, surface to edge, edge to edge, edge to corner, corner to corner… maybe one or two I’m forgetting? And some cases, “what is the point of impact” is ambiguous. For edge to surface, what is the contact point? The deepest part? The center? Edge to edge might be a singularity or might be the entire length of the edge.

Once you’ve found the point and contact information, imparting momentum changes is the same for all types of shapes. (Their inertia tensor will be different for different bodies but the math is the same.)

(I also wrote my own distributed physics engine from scratch which is why I’m more than passingly familiar with this… even if I did cheat in my collision detection to simplify the problem a little.)

Edit: and the really lovely thing is that small errors in one part of the math will often have huge and counterintuitive buggy looking effects in other parts. When I scaled my sailing ships up to full size, they could barely sit on the ground without jittering… seemed like a mass to mass precision problem. Or if they sat still, bumping them would cause them to behave oddly… turned out that there was a bug in the inertia tensor calculation. A really small one.

Lesson: Any physics engine that deals with different scales of objects is going to need reasonably accurate inertia tensors.