ドキュメント

Unity Engine

Unity Engine

OverlapPoint(Vector2)

Check if any of the Rigidbody2D colliders overlap a point in space.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.Physics2DModule
public bool OverlapPoint(Vector2 point)

Parameters

point

A point in world space.

Returns

Type

Description

boolWhether the point overlapped any of the Rigidbody2D colliders.

Remarks

Any EdgeCollider2D attached to the Rigidbody2D won't be checked for an overlapping point as they don't have any area therefore do not support this.