ドキュメント

Unity Engine

Unity Engine

BoxCastNonAlloc(Vector3, Vector3, Vector3, RaycastHit[], Quaternion, float, int, QueryTriggerInteraction)

Cast the box along the direction, and store hits in the provided buffer.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

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

Center of the box.

halfExtents

Half the size of the box in each dimension.

direction

The direction in which to cast the box.

The buffer to store the results in.

orientation

Rotation of the box.

maxDistance

The max length of the cast.

layerMask

A Layer mask that is used to selectively filter which colliders are considered when casting a box.

queryTriggerInteraction

Specifies whether this query should hit Triggers.

Returns

Type

Description

intThe amount of hits stored to the
results
buffer.