This had me puzzled for a while, until I realized that it doesn't really 'detect' a collision. We know there's going to be a collision, this just finds the next one.