ドキュメント

Unity Engine

Unity Engine

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

Check the given capsule against the physics world and return all overlapping colliders.
読み終わるまでの所要時間 1 分最終更新 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 filter which colliders are considered when casting a capsule.

queryTriggerInteraction

Specifies whether this query should hit Triggers.

Returns

Type

Description

Collider[]Colliders touching or inside the capsule.