I’m looking for a version of Physics2D.CircleCastAll that will find collisions within a non-default PhysicsScene2D. The cast methods on the PhysicsScene2D only find the first collision. Is there a way of doing this and if not, is there any plan to implement it?
PhysicsScene2D has all queries available. The “All” and “NonAlloc” suffixes were dropped and each query has many overloads that allow returning multiple items into an array or List. Note that these overloads are done in the Physics2D side of things too. Effectively the All & NonAlloc are tentatively deprecated but because their usage is so widespread, it was decided to non deprecate them for a while.
All you’ve got to do is click on the docs to see all the overloads. Scroll down to see all three (single result, array results and list results).
If all you did is look at the PhysicsScene2D without actually clicking on it then you’d be forgiven for assuming it only returned a single results because unfortunately the docs take the summary of the first overload to describe the method.
Excellent, thanks for the help. As you say I just looked at the list of methods on PhysicsScene2D and, since the description there clearly said they only returned a single item and I was expecting any method returning multiple results to have the All suffix, I didn’t read the list of overloads.