Hey, how would I get the “angle” or “direction” between two Vector3fs?
Just add them together to get a resultant sum vector.
Got the answer from this site: http://www.nfostergames.com/Lessons/VectorMath.htm
[quote]
Vector subtraction is as easy as simple arithmatic. You simply subtract each component of one vector from the other.
c = a - b
Example:
Vector a = (3, -5, 7)
Vector b = (5, -2, -9)
Vector c = (3 - 5, -5 - -2, 7 - -9) = ( -2, -3, 16)
So, what does vector subtraction get us? A couple of useful things. It gives us the direction from one vector to another. In this example, ‘c’ is a vector that points from the point represented by vector ‘b’ to vector ‘a’. Using vector ‘c’ we can determine a direction and distance from b to a, which we shall show in the next two examples.
[/quote