Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


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

Check whether the given box overlaps with other colliders or not.
Read time 1 minuteLast updated 4 days ago

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.