Quote:
Originally Posted by Effeff
I am guessing what I forgot to do is use NormalizeVector somewhere?
|
Yeah you should normalize both vectors. Dot product takes vector magnitudes into account but you're not interested in that, hence why we want unit vectors. Also you don't need the
AddVectors and
MakeVectorFromPoints part -
attackerVel and
attackerVelVec are equivalent vectors in your case. Also as you seem to have some trouble wrapping your head arounds vectors in space, read up on
free and
bound vectors; I think that may help you a bit. Here we are always working with free vectors - the initial point of all vectors is the world origin (0, 0, 0), so all vectors with the same direction and magnitude are equivalent.
While you may be thinking of velocity as this:
In actuality it's just this:
__________________