SetAttachTransform

Category: Objects / Display
Since engine version: 1.0 OC

Description

If a mesh was previously attached to another one via AttachMesh then the transformation of the attached mesh can be changed using this function.

Syntax

bool SetAttachTransform(int attach_number, array transformation);

Parameters

attach_number:
Number of the attached mesh whose transformation is to be changed. The return value of AttachMesh provides such a number.
transformation:
New transformation to be applied on the attached mesh in its own frame of reference. The array should consist of 12 integer entries which make up a 3x4 matrix in which each vaule is given in promille (1000 = 100%). These matrices can be created via Trans_Identity, Trans_Translate, Trans_Rotate and Trans_Scale or they can be combined via Trans_Mul.

Example

SetAttachTransformation(attach_number, Trans_Identity());
Resets the transformation of the attached mesh with number attach_number. It is assumed that there is a variable named attach_number containing a valid number such as returned by AttachMesh.
See also: AttachMesh, DetachMesh, SetAttachBones, Trans_Identity, Trans_Mul, Trans_Rotate, Trans_Scale, Trans_Translate
Clonk-Karl, 2010-04