Version: 2017.4
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Rigidbody2D.OverlapPoint

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Switch to Manual
public method OverlapPoint(point: Vector2): bool;
public bool OverlapPoint(Vector2 point);

Parameters

pointA point in world space.

Returns

bool Whether the point overlapped any of the Rigidbody2D colliders.

Description

Check if any of the Rigidbody2D colliders overlap a point in space.

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.