direction | La posición del rigidbody. |
maxDistance | The length of the sweep. |
queryTriggerInteraction | Specifies whether this query should hit Triggers. |
RaycastHit[] An array of all colliders hit in the sweep.
Igual que Rigidbody.SweepTest, pero devuelve todos los impactos.
The sweep may return multiple hits against the same collider if more then one of the rigidbody's attached colliders would hit it.
Note that this function only works when a primitive collider type (sphere, cube or capsule) or a convex mesh is attached to the rigidbody object - concave mesh colliders will not work, although they can be detected in the scene by the sweep.
This function can only return up to 128 hits.