The Normal
property of the Vector3
struct returns a unit vector that represents the direction of the original vector. A unit vector is a vector with a length of 1, which is useful for representing directions without regard to magnitude.
The Normal
property of the Vector3
struct returns a unit vector that represents the direction of the original vector. A unit vector is a vector with a length of 1, which is useful for representing directions without regard to magnitude.
To use the Normal
property, simply access it from an instance of Vector3
. This will return a new Vector3
that is the normalized version of the original vector.
Vector3 vector = new Vector3(3, 4, 0); Vector3 normalizedVector = vector.Normal; // normalizedVector is now (0.6, 0.8, 0)