---
name: "get_translation_matrix_f"
section: "3alleg4"
platform: "linux"
package: "allegro4-doc"
version: "2:4.4.3.1-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/get_translation_matrix/3alleg4"
---

# get\_translation\_matrix\_f(3alleg4)

Constructs a translation matrix. Allegro game programming library.

Part of [get\_translation\_matrix(3alleg4)](/get_translation_matrix/3alleg4.md).

## NAME

get\_translation\_matrix, get\_translation\_matrix\_f - Constructs a translation matrix. Allegro game programming library.

## SYNOPSIS

**#include \<allegro.h\>**

**void get\_translation\_matrix(MATRIX \*m, fixed x, fixed y, fixed z);**

**void get\_translation\_matrix\_f(MATRIX\_f \*m, float x, float y, float z);**

## DESCRIPTION

Constructs a translation matrix, storing it in m. When applied to the  point (px, py, pz), this matrix will produce the point (px+x, py+y,  pz+z). In other words, it moves things sideways.

## SEE ALSO

**apply\_matrix**(3alleg4), **get\_transformation\_matrix**(3alleg4), **qtranslate\_matrix**(3alleg4), **exstars**(3alleg4)
