So, imagine we have an object at point A travelling in direction B.

In game dev, assuming 3D, we’ll usually use a Vector3 to represent both the point A and the direction B.

A Vector3 has 3 components to the Vector; X, Y and Z and these can be used to represent a position in Cartesian space or a direction vector

With positions, we’ll use X to represent the position across the scene, Y is the position ‘Up’ the scene and Z is the position ‘Into’ the scene.

Now, if you know 3D math, you’re going to be picking holes in what I’ve said, but I’m giving a very broad overview to allow everyone to get up to speed with the general concepts, so take it with a pinch of salt.

Right, so we have our position in 3D space, but how do we represent a direction?

Direction is, again, a Vector3 as we’re representing a distance of movement in the three components. As an example, if I had a Vector3 something like 10, 0, 0 then I’d be expecting movement of 10 meters in the X, 0 meters in the Y and 0 in the Z. i.e., I’d be moving left to right at a rate of 10 meters per second.

The ‘per second’ here is important, as you’ll need to get to grips with a concept called Time Delta if you’re going make a game that works well across all platforms.

Let us know any questions in the comments.


Discover more from

Subscribe to get the latest posts sent to your email.

Leave a comment

Trending