Vectors represent directions and position?

I love your course so far; lots of useful information for creating 2d games, but I did seem to have found a minor discrepancy in your summary on vectors.
Maybe it is just you’re wording that is confusing because you can use vectors to “find” a position, but the positional component is not part of the vector; technically vectors represent direction and “displacement.” Anyways the only reason I brought this up is because it took me a while to grasp this point and maybe this would help someone to understand the difference between a vector (magnitude and displacement) and a point in space(position).

Since game dev uses a coordinate system, position is always a vector. It represents the distance and direction from the origin.

I had the coordinate system in mind, but it doesn’t matter; the origin is a point in space just like any other point in space and without it position based on the vector is unknown. the vector is the distance(displacement) and direction from one point to another; the points are the position, and vectors are ways to find a point in space based on another. besides you do not always start from the origin you can start from any point in 2d space (like when you add or subtract two vectors together, at least one of them will not begin at the origin.) Note: excluding zero vectors.

I get the confusion from a linear algebra perspective, but you kinda have to loosen your grip on it a little bit.

In game developer we overload the intended purpose or use of a vector because vectors can basically represent anything in a given vector space.

In our case; a vector will usually represent a position, direction (when normalized), velocity, or distance depending on the task at hand. This is where the importance of naming your variables comes into play.

1 Like

EDIT:
I am actually more confused from a programming perspective:
I know that the type Vector (such as Vector2) is used to create a variable that contains an x and y value that can be used anyway you like (it doesn’t have to be used to hold magnitude and direction or positional data.) So from that perspective I assumed he was referring to a mathematical vector.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms