Game dev
Saved & recent

Transform

Related terms: matrix, TRS, model matrix

The position, rotation and scale of an object. Engines store it as a 4x4 matrix, a grid of 16 numbers. Multiplying a point by the matrix moves, rotates and scales it in one step.

Matrices can be chained. A hand's matrix times the arm's matrix times the body's matrix gives the hand's final place in the world. Order matters: rotate then move is not the same as move then rotate.

Further reading
LearnOpenGL: Transformations: model matrices
scale ×1.5 on X pivot rotate 60° translate
Scale the block along its local X axis, rotate it around its pivot, then translate it. Each dashed outline shows the input to that step.

View in the full Game dev collection