Skip to main content

Matrix4x4.TRS(Vector3 pos, Quaternion q, Vector3 s)

Creates a translation, rotation and scaling matrix.

Parameters:

NameTypeDescription
posVector3position
qQuaternionRotation
sVector3Scale

Returns:

typeDescription
Matrix4x4translation, rotation and scaling matrix.

Usage

---@type Vector3
local pos;

---@type Quaternion
local q;

---@type Vector3
local s;


local val0 = Matrix4x4:TRS(pos, q, s)

Extra Detail

The returned matrix is such that it places objects at position pos, oriented in rotation q and scaled by s.