기술 자료

Unity Engine

Unity Engine

OverlapCapsule(Vector3, Vector3, float, int, QueryTriggerInteraction)

Check the given capsule against the physics world and return all overlapping colliders.
읽는 시간 1분최근 업데이트: 한 달 전

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.PhysicsModule
public static Collider[] OverlapCapsule(Vector3 point0, Vector3 point1, float radius, int layerMask, QueryTriggerInteraction queryTriggerInteraction)

Parameters

point0

The center of the sphere at the start of the capsule.

point1

The center of the sphere at the end of the capsule.

radius

The radius of the capsule.

layerMask

A Layer mask that is used to selectively ignore colliders when casting a capsule.

queryTriggerInteraction

Specifies whether this query should hit Triggers.

Returns

Type

Description

Collider[]Colliders touching or inside the capsule.