BoxCastNonAlloc(Vector3, Vector3, Vector3, RaycastHit[], Quaternion, float, int, QueryTriggerInteraction)
Cast the box along the direction, and store hits in the provided buffer.
Read time 1 minuteLast updated 4 days ago
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.PhysicsModule
public static int BoxCastNonAlloc(Vector3 center, Vector3 halfExtents, Vector3 direction, RaycastHit[] results, Quaternion orientation, float maxDistance, int layerMask, QueryTriggerInteraction queryTriggerInteraction)
Parameters
Center of the box.
Half the size of the box in each dimension.
The direction in which to cast the box.
The buffer to store the results in.
Rotation of the box.
The max length of the cast.
Specifies whether this query should hit Triggers.
Returns
Type | Description |
|---|---|
| int | The amount of hits stored to the results buffer. |