format
typescript
Physics.CapsuleCastAll(p0, p1, radius, direction, maxDistance, mask, cast_trigger)class: Physics
description
Performs a capsule cast and returns all the hit objects that intersect with it.
This method casts a capsule-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 |
|---|---|---|
| p0 | Vector3 | One endpoint of the capsule |
| p1 | Vector3 | The other endpoint of the capsule |
| radius | number | The radius of the capsule |
| direction | Vector3 | The direction in which the capsule is cast |
| maxDistance | number | The maximum distance the capsule is cast |
| mask | number | The layers to perform collision detection with (bitwise operation) |
| cast_trigger | QueryTriggerInteraction? | Whether the ray should perform collision detection with triggers |
return
| type | description |
|---|---|
RaycastHit|undefined | Whether the ray intersects with an object, returns undefined if there is no intersection |
