ドキュメント

Unity Engine

Unity Engine

normal

A normalized vector that points from pointB to pointA.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

  • Type: Property
  • Namespace: UnityEngine
  • Assembly: UnityEngine.Physics2DModule
public Vector2 normal { get; }

Remarks

The normalized vector points from ColliderDistance2D.pointB to ColliderDistance2D.pointA. When it is scaled with the ColliderDistance2D.distance is produces a vector that can be used to move the Collider2D so that they are no longer overlapped (if the ColliderDistance2D.distance is negative) or so they are touching (if the ColliderDistance2D.distance is positive).