Given a sweep test for a ray, how do we check collisions after the 1st collision has been detected, and the ray has been deflected.

Physics system steps are:

1. Update velocities (gravity, etc)
2. Resolve collisions
	* The ray will intersect the floor, and will be moved back at the penetration amount.
	* The new velocity is calculated as a reflection
3. Update positions
	* The ray is now on the wrong side of the wall

This all happens in 1 frame

If the orange ray hits the floor just before the wall, the new velocity will tunnel the ray through the wall within one frame.
The naive way to fix this would be to after each collision check all the bodies again with the new velocity, but this can take multiple iterations if the ray bounces around in a corner. There is no way of knowing how many times the ray will need to be processed.

What would be a good way to fix this issue?

[![Wall is missed in 1 frame](https://i.stack.imgur.com/ai0L0.png)](https://i.stack.imgur.com/ai0L0.png)