Hi all,
In the Day 50 episode Casey uses an epsilon value to move the player slightly away from the wall after a collision. He mentions at the time that this is undesirable and that he plans to eliminate it in a future revision of the code.
As I understand it, the epsilon is used to cope with the imprecision in the intersection point calculation, to ensure that the player remains on the correct side of the line for tests in subsequent frames.
I'm just wondering how Casey might be planning to resolve this issue without the use of the epsilon value?
I understand that instead of using infinitely thin lines, one could use shapes with volume, and that would prevent tunnelling on the next frame. But it seems that you could still run into issues without using some kind of epsilon value to push the bodies apart. For example, if you had a row of boxes positioned side by side horizontally, with the player "gliding" along the top of them. If the player collides with the first box in the row from the top, the calculated collision point could conceivably be slightly inside the top of the box due to inaccuracy. So without moving the player back out again by an epsilon, if you continued to glide the player along the row of boxes, he could get snagged by the side edge of the next box in the row... unless I'm mistaken?