Could you please write a simple script that shows how it'd be used?
Judging from what I understand so far, I'd recommend allowing a list to be provided for query results. I know you could just use a really huge array. But I understand if this could possibly mess up some sort of optimization or simplicity with regards to how the parallelization is done.
I'm guessing a raycast (similar to Physics.Raycast) would be done by enumerating through the results and:
Also, I LOVE the idea of contactOffset! This is something I wish Unity exposed in UnityEngine.Physics.
Judging from what I understand so far, I'd recommend allowing a list to be provided for query results. I know you could just use a really huge array. But I understand if this could possibly mess up some sort of optimization or simplicity with regards to how the parallelization is done.
I'm guessing a raycast (similar to Physics.Raycast) would be done by enumerating through the results and:
- Discarding results that have a positive distance
- Converting the "point" result to a raycast distance using a dot product "dot(point-rayOrigin,rayDirection)" and discarding all but the smallest positive result (the closest point ahead of the ray).
- Returning the result if they weren't all discarded.
Also, I LOVE the idea of contactOffset! This is something I wish Unity exposed in UnityEngine.Physics.