Game programming - Using vectors called forward, left/right and up

Started by
11 comments, last by BCullis 11 years, 2 months ago

In fact, forward, right and up vector is so basic for defining an orientation, that you can put them directly into the columns of a matrix, and you have a rotation matrix that transforms your points into the orientation.

Advertisement

In fact, forward, right and up vector is so basic for defining an orientation, that you can put them directly into the columns of a matrix, and you have a rotation matrix that transforms your points into the orientation.

Oh, interesting. Thank you for pointing that out. smile.png

No wonder they used these vectors in Ratchet and Clank 3, then. wink.png

Really, the best way to think about it is that a vector is just a number. (Sure it's actually 3 numbers, but just think of it as a bloated "number".) So a vector *could* be used to describe a point, or a direction, or a direction and a magnitude, but that's giving them special meaning. It just happens that in a 3d world, it's convenient to use 3 numbers at a time to describe things. That's really all there is to it.

QFE!

My camera needs a contextual Up, Left, and Forward, as do my character controls. Physics calculations want to know positions, surface normals, incoming direction and magnitude, etc. They're all represented by three values corresponding to a game-space X-, Y-, and Z-axis, but in some contexts the numbers are purely positional, and in others (usually interactions as opposed to identities) they represent distances or velocities.

Hazard Pay :: FPS/RTS in SharpDX (gathering dust, retained for... historical purposes)
DeviantArt :: Because right-brain needs love too (also pretty neglected these days)

This topic is closed to new replies.

Advertisement