I am wondering if the order of the colliders returned from Physics.RaycastAll is consistent… in particular, is the order always in increasing order of distance from the origin, or do I have to sort them?
Thanks in advance,
Mark
I am wondering if the order of the colliders returned from Physics.RaycastAll is consistent… in particular, is the order always in increasing order of distance from the origin, or do I have to sort them?
Thanks in advance,
Mark
The order is undefined, so you have to sort them.
–Eric
Okay, thank you. I had figured as much and wrote my code accordingly from the get-go, but I was since wondering if I could make an optimization by removing a possibly redundant Sort call.
Apparently not. Oh well.