isOverlapped
Gets whether the distance represents an overlap or not.
Read time 1 minuteLast updated 10 days ago
Definition
- Type: Property
- Namespace: UnityEngine
- Assembly: UnityEngine.Physics2DModule
public bool isOverlapped { get; }
Remarks
The ColliderDistance2D.distance can be positive indicating that the Collider2D are separated (not overlapped), zero indicating that they are touching (but not overlapped) or negative indicating that they are overlapped.
This property is therefore a check to see if ColliderDistance2D.distance is negative which indicates the Collider2D are overlapped.