Trans_Translate

Category: Arithmetics
Since engine version: 1.0 OC

Description

Returns a 3x4 translation matrix. It can be used as a transformation for AttachMesh or for the "PictureTransformation" or "MeshTransformation" properties (see Meshes).

Syntax

array Trans_Translate(int dx, int dy, int dz);

Parameters

dx:
Displacement in X direction
dy:
Displacement in Y direction.
dz:
Displacement in Z direction.

Remark

A value of 1000 for dx, dy or dz displaces the graphics by one unit to the right, to the bottom or to the front, respectively. For negative values displacement goes into the opposite direction. For graphics that are rendered directly in the game (such as the one influenced by the "MeshTransformation" property) one unit in X or Y corresponds to one pixel. All parameter values are given in one-tenth of a percent (1000 = 100%) since there are no floating point numbers in Clonk.

Example

this["PictureTransformation"] = Trans_Translate(0, 0, 7000);
Displaces the picture graphics of the calling object by 7 units towards the camera. This causes it to be displayed larger because of the perspective projection.
See also: AttachMesh, SetAttachTransform, Trans_Identity, Trans_Mul, Trans_Rotate, Trans_Scale
Clonk-Karl, 2010-04