What does "Normalize" do?

Hi all,
I’ve followed this video tutorial, everything works fine and I don’t have any problems. My only question is, what is the concept of “Normalize”? What does it do?

In short:
The guy is trying to get a sphere to move towards the player character
so he gets the player location, subtracts it from the location of the sphere, then “Normalizes” the result.

What is the purpose of normalize here, why is it required and what does it do?

If you wish to see the video tutorial, here it is, watch from 3:00


Thanks

3 Likes

“so he gets the player location, subtracts it from the location of the sphere”

When we subtract a vector from other then we get a vector which have some magnitude and direction and when we normalize this vector we make the magnitude of vector to be 1 and keeps the direction of vector.

“Normalize” in vectors means to change the vector so that it points in the same direction (think of that line from the origin) but its length is one.

In tutorial, he is using the normalized vector (having direction and magnitude of one) , if the vector is not normalized then multiplying delta seconds output from tick event with not normalized vector will increase the value rapidly as distance between player and sphere will have some value more than one.

3 Likes

Thank you!

Please mark this answer accepted if you found it useful.

Thanks

Apologies, I thought I already had.

Once again, many thanks.

Japanese Translation

in additional some visual details: Magnitude and Direction of Vectors

1 Like