Ok Ive been spent today reading about vectors etc and I cant see the difference between a vector and a 3d point? In the examples ive seen and the opengl game programming book, a vector just holds the 3d co-ords for a point... like (2,2,3). Is this right??? Doesnt seem to make sense
Think of a 3D point as being a vector from the origin to that point. What you are interested in is a direction vector, i.e. the direction the player is facing. For example if the player is facing straight up the y-axis his direction vector is (0,1,0). (N.B. This is the NORMAL vector, i.e. it has unit length.) The player could be at any position (pos_x,pos_y,pos_z), but if he is facing up the y-axis his direction vector is always (0,1,0). Each player therefore has a position (pos_x,pos_y,pos_z) and a direction (dir_x,dir_y,dir_z), both stored as 3 floats. You seem to be thinking these are the same thing. Hope this helps.