If I studying a collision detection of two balls on one dimensional. Suppose the first one in position 0 and his velocity 5 pixel each frame, and second one in position 3 and his velocity -5 pixel each frame then in the next frame, the first ball will move to position 5 and second one will jump to position -2. In this case we don't have an overlapping between them so the collision detection will fail. How can I handle this case? here a picture for explanation:
