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:

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

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!
Expected:
Attachment:
rays-correct.jpg [ 19.52 KiB | Viewed 804 times ]
Actual:
Attachment:
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!