distance
Gets the distance between two colliders.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前
Definition
- Type: Property
- Namespace: UnityEngine
- Assembly: UnityEngine.Physics2DModule
public float distance { get; set; }
Remarks
The distance between two colliders is defined as the length of a Vector2 between ColliderDistance2D.pointA and ColliderDistance2D.pointB. The ColliderDistance2D.distance between these points 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.