format
typescript
Physics.SphereCastAll(ray, radius, maxDistance, mask, cast_trigger)class: Physics
description
Performs a spherecast and returns all the hit objects.
This method casts a sphere-shaped ray in the scene to check for intersections with objects and stores the intersection information with all the objects.
parameter
| param_name | type | description |
|---|---|---|
| ray | Ray | The ray object to be cast. |
| radius | number | The radius of the sphere. |
| maxDistance | number | The maximum distance the sphere is cast. |
| mask | number | The layers to perform collision detection on (bitwise operation). |
| cast_trigger | QueryTriggerInteraction? | Whether to perform collision detection with triggers. |
return
| type | description |
|---|---|
RaycastHit|undefined | Returns the intersection information with objects if there is an intersection, otherwise returns undefined. |
