Vector Math - Unity

Vector Math 

Addition:

 As you that the vector addition is defined by the combined effect of two or more than two vectors. When the tail of one vector is added to the head of other vector addition is made.
This can be defined by a parallelogram.Actually joining two vectors result into a new vector.


Subtraction: 



Vector subtraction is performed to get the direction and distance from one object to another.
The addition and subtraction of vectors is similar as the subtraction of vector will have negative negative magnitude that means opposite in direction. As in subtraction head to tail rule is also used.

Dot Product :

The multiplication of two vectors will result in a scalar quantity. Where Theta is the angle is multiplication of the two vectors is 0 than its perpendicular. In unity we use Mathf.Cos.
Which perform equal-ant function.

Cross Product:

The result is perpendicular to the two vectors. The "Left hand rule" can be used to remember the
direction of the output vector from the ordering of the input vectors. If the first parameter is matched up to the thumb of the hand and the second parameter to the forefinger. Then the result will point to the direction of the middle finger.  If the order of the parameters is reserved then the resulting vectors will point in the exact opposite direction but will have the same magnitude.


Comments

  1. This comment has been removed by the author.

    ReplyDelete
  2. Very diversified blog covering all the nature of the subject topic. Great math of vector tracing. Thank you very much...!

    ReplyDelete

Post a Comment

Popular posts from this blog

How to move an object in Unity 3D

Input.Getaxis, OnMouseDown, GetComponent< > - Unity Scripts