The wiki says that:
http://www.love2d.org/wiki/World:rayCastYou cannot make any assumptions about the order of the callbacks.
However, I need to get these callbacks in a manner that allows me to make assumptions
![Smile :)](./images/smilies/ms-smile.png)
The solution I'm thinking about is to fill in a table with each ray collision, sort the entries based on distance to the gun ( or maybe the "fraction" parameter from the callback? ) and go from there.
However, won't this break down when I cast more than one ray at a time? Or is each World:rayCast() call a blocking call (that is to say, for each ray trace, all callbacks will be made before the World:rayCast() call ends)?
PS: I'm new to Lua and not very certain of how multi-threading is handled.