For example, if an object has the XYZ coordinate of (0,2,0), then the magnitude is 2, and the direction is "up the Y axis." When you multiply a vector by a single number, the result is a new vector with the same direction, but the magnitude has been multiplied by the single number.The single number is called a "scalar," which is why this is called "scalar multiplication."For example: Vector addition is most easily understood by looking at a graphical representation in 2D.
Unit vectors are vectors with a magnitude equal to one. It doesn't really matter what the magnitude is when a vector is only used to represent a direction.
Again, remember the previous article, where it explains that instead of moving the camera forward we would pull the whole 3D scene backward.
The vector negation will reverse the direction, so "forward" will become "backward."The .
This article builds on the code from the previous article.
The code for this article can be found in the file in Visual Studio 2013, and open the project that corresponds with this article.