Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


normal

A normalized vector that points from pointB to pointA.
Read time 1 minuteLast updated 4 days ago

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).