A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Now in Beta! Get 1:1 live lessons on any Unity topic or help troubleshooting your project – Connect with an expert on Unity Live Help
Discussion in 'Scripting' started by topaz7, Dec 29, 2012.
I'm sorry but I'm not that good in MATHS.
If a vector becomes normalized it keeps its direction but its length is set to either 1 or 0 depending on factors.
Thanks but I'm still confused. What is the direction on vector?(I thought it was a point in world space) and what is the length?
This might help.
Think of it this way... a Vector holds 2 pieces of information - a point in space and a magnitude. The magnitude is the length of the line formed between (0, 0, 0) and the point in space. If you "normalize" a vector (also known as the "unit vector" - Google it), the result is a line that starts a (0, 0, 0) and "points" to your original point in space. If you were to take the length of this "pointer" it would equal 1 unit length. This is helpful for a lot of different reasons.
Thank you very much both of you. Finally understood what it is. So, a vector can only contain either magnitude or point?
A Vector contains both pieces of information, a normalized vector has a magnitude of 1.
A Vector2 is either a point or a direction, depending on what you use it for. For example, if it's (5, 0), then it's either a point at x=5, y=0, or it's a vector pointing along the positive x axis with a slope of 0 and a length of 5. In this case it's not normalized since the length is greater than 1. If you normalize it, then it will become (1, 0) and will have a length of 1.