Skip to content

format

typescript
Matrix4x4.FromTRS(pos, rot, scale)

class: Matrix4x4

description

Create a matrix based on translation, rotation, and scaling information.

parameter

param_nametypedescription
posVector3Position
rotQuaternionRotation
scaleVector3Scaling

return

typedescription
Matrix4x4The new matrix

code example

typescript
let pos = new Vector3(1,1,1);
let rot = new Quaternion(0,0,0,1);
let scale = new Vector3(1,1,1);

Matrix4x4.FromTRS(pos, rot, scale);