Dot and Vector product

Started by
2 comments, last by BitMaster 12 years, 9 months ago
What are the dot and vector cross product used for in terms of games programming? I think the vector product can be used to discover if an AI character can see a player, is that right? How does that work (if its right)?
Advertisement
Asking a question like that is like asking what nuts and bolts are used for. The applications are, without further constraints, too endless to list and there is no clear starting point to even start listing.

With a dot product you can find out the angle between two vectors. Or project a vector onto another. Or calculate the distance of a point from line or plane in Hessian normal form.
With a cross product you can calculate a vector standing perpendicular on two others. Or calculate the area of a parallelogram.
With both together you can calculate the determinant of a 3x3 matrix.
Apologies. I should have said i was just looking for a few examples of where it is used most, or its most important uses, not every one. Cheers
That does not really help either. ;)

If you have the up and forward vector of a camera you can calculate the right vector with the cross product. Essential in some games. Completely unneeded in others. And so on.

It would be much easier to ask "how can I solve problem XYZ with vector algebra". If you just want to know if learning vector algebra is useful: most likely yes.

This topic is closed to new replies.

Advertisement