Vector3 Normal { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The Normal property of the Vector3 struct returns a unit version of the vector. A unit vector, also known as a normalized vector, has a length of 1. This property is useful for obtaining the direction of the vector without regard to its magnitude.

Usage

To use the Normal property, simply access it on an instance of a Vector3 object. This will return a new Vector3 that represents the direction of the original vector but with a magnitude of 1.

Example

Vector3 vector = new Vector3(3, 4, 0);
Vector3 normalizedVector = vector.Normal;
// normalizedVector is now (0.6, 0.8, 0)