in the Box2D Flash Testbed, there is an odd behavior of the raycast.
steps to reproduce
//for laser
bd.position.Set(4.1, 11.7);
//for circle
bd.position.Set(1.5, 10.8);
this puts them into position such that the laser hits the circle, and would hit the wall if the circle were not there.
when this is the case, lambda is returned for the circle some times and for the wall other times (every 4th time in my tests).
causing the drawn line to flash, between hitting the wall and hitting the circle.
perhaps the testbed raycast is not setup to detect which fixture is closer?
anyway looked glitch-y and took be a little while to track down the cause.
figured i would share my results.
steps to reproduce
//for laser
bd.position.Set(4.1, 11.7);
//for circle
bd.position.Set(1.5, 10.8);
this puts them into position such that the laser hits the circle, and would hit the wall if the circle were not there.
when this is the case, lambda is returned for the circle some times and for the wall other times (every 4th time in my tests).
causing the drawn line to flash, between hitting the wall and hitting the circle.
perhaps the testbed raycast is not setup to detect which fixture is closer?
anyway looked glitch-y and took be a little while to track down the cause.
figured i would share my results.