how to prevent tunneling through a sensor?

I'm making an ipad game using cocos2d and box2d.

Among other elements, there's a fast-moving player object and a bunch of static line objects. I want the lines to detect when the player crosses them but not to act like a wall to the player object or any other moving objects in the game. So I've got the lines set to be sensors.

However, the nifty anti-tunneling code that Box2D has for fast-moving object collision detection doesn't seem to apply to bodies that are set as sensors. So now my player object passes right through the lines and only gets detected maybe one time in five.

How can I get box2d to detect the sprite crossing the line every time, no matter how fast it's going?

In researching this I found this post: http://www.box2d.org/forum/viewtopic.php?f=8&t=6932 Where someone asked a similar question, and found a solution themselves. But I don't follow the solution and was hoping to get a clearer explanation, or possibly a simpler solution.

Thanks so much 🙂
I would use ray casts to detect sensor crossings.

Original thread: https://box2d.org/forum/viewtopic.php?t=8365