Unexpected behavour with raycasting and edges in the AS3 por

I'm seeing some unexpected behavior with ray casting and edges in the latest AS3 port (2.1a). At times rays just pass through edges they should be intersecting. I've attached some images to illustrate the problem.

Expected:
Attachment:
rays-correct.jpg
rays-correct.jpg [ 19.52 KiB | Viewed 804 times ]

Actual:
Attachment:
ray-errors.jpg
ray-errors.jpg [ 20.94 KiB | Viewed 804 times ]


I have managed to fix this using information posted in previous discussions. Combining both the fix here (viewtopic.php?f=4&t=4373) and here (http://www.kirupa.com/forum/archive/ind ... 57332.html).

Fix one uses thin oriented boxes instead of edges, fix two updates b2World.RayCastOne to iterate through the RayCast results vector to return the nearest hit, neither individual fix works reliably alone.

Questions:
1) Does using oriented boxes instead of edges have a negative performance impact? (it would seem to me it does)
2) Can anyone confirm whether this is a known issue with the AS3 port, I'd be happy to supply test files
3) Any idea if this works as expected in the alchemy port?


ps. Love box2d amazing work guys!
That sounds very much like this:
http://code.google.com/p/box2d/issues/detail?id=219

Using polygon boxes instead of edges would take a little more processing time, but I doubt it would be noticeable unless you had a huge number of them. I'd say if you don't notice it, don't worry 😉
Looks exactly like the same issue, I guess it's safe to assume this will be in the alchemy port.

Thanks very much for the response, I've voted on the issue. 😀

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