Couldn't find a clear enough answer on Google.
I know what vectors are. But what does it mean to project a vector onto another, and what is it used for in games?
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It only takes a minute to sign up.Sign up to join this community
Vector projection means finding the components of vector a that are in the same direction of vector b. Check my answer here for how to do it.
Not only vector projection is important in game dev but vector decomposition in general, where you have a vector and you need to decompose it into 3(or 2) separate vectors in the u,v,w directions.
For example in order to find a local frame of reference (read: object space/coordinates) you often need to find three linearly independent vectors which form the frame of reference. You can start by finding the projection on X axis (or the local u direction) and then continue with cross product to find the third vector. The final step would to cross product the result two vectors from the previous operations.
Another situation in physics simulation you will often have force vectors that you need to find their sum in each direction, you cannot do that unless you do vector decomposition.