Multi-hit versions of physics cast commands

Hello there!

While writing a tool that required a lot of Spherecasts to determine what objects surround other objects, I looked into the job commands for physics casts to see if I can parallelize that aspect. However, I noticed that while there is a multi-hit version of RaycastCommand (maxHit parameter), Spherecast, Boxcast and Capsulecast only support single-hit results.

Are there any plans to add multi-hit support for the other casts?

The multi-hit property of RaycastCommand does not work. However, the experimental Unity.Physics package offers an API that has multi-hit queries. The method I believe is CollisionWorld.CastX(XInput input, ref NativeList allHits). It seems to fill the NativeList with all hits whether it’s a raycast or spherecast. Hope this helps