
190 Game Development and Simulation with Unreal Technology
Dot Product: Th is expression takes two vectors as input and returns a scalar value
that is equal to the dot product of the two input vectors. Mathematically speaking,
the dot product will c reate a scalar that is proportional to the Cosine of the ang le
between the two input vecto rs.
Let X and Y be two vector s. The dot product of these two vectors is calculated
according to the following equation:
X ⊙ Y = |X| · |Y| · cos(
θ
) (4.5)
where
θ
is the angle betwe en vectors X and Y.
TABLE 4.20: Dot Product
Inputs
A: Takes in a value or vector any length as the first vector.
B: Takes in a value or vector ...