文档

Unity Engine

Unity Engine

CheckBox(Vector3, Vector3, Quaternion, int, QueryTriggerInteraction)

Check whether the given box overlaps with other colliders or not.
阅读时间1 分钟最后更新于 1 个月前

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.PhysicsModule
public static bool CheckBox(Vector3 center, Vector3 halfExtents, Quaternion orientation, int layermask, QueryTriggerInteraction queryTriggerInteraction)

Parameters

center

Center of the box.

halfExtents

Half the size of the box in each dimension.

orientation

Rotation of the box.

layermask


queryTriggerInteraction

Specifies whether this query should hit Triggers.

Returns

Type

Description

boolTrue, if the box overlaps with any colliders.