O'Reilly logo

Beginning Math and Physics for Game Programmers by Wendy Stahler

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Translation

Let's start with the simple motion of moving objects left, right, up, and down on a flat 2D screen. The fancy name for moving objects in these directions is translation. Objects can be translated using both matrix addition and matrix multiplication. If all you plan to do is translate an object, you should definitely use matrix addition, because it is by far faster and easier. However, if you plan to scale and/or rotate your object in the same frame, you have to perform the translation using matrix multiplication instead. Let's tackle the addition method first.

Most people already have an intuitive feel for translation using addition after working with the Cartesian coordinate system. Suppose you had an object at point P(1,2) and you ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required