Method Decompose
Decompose(Matrix4x4, out Vector3, out Quaternion, out Vector3)
Decompose the given matrix into translation, rotation, and scale, accounting for potential handedness changes in the matrix. Returns false if the matrix is singular.
Declaration
public static bool Decompose(Matrix4x4 matrix, out Vector3 translation, out Quaternion rotation, out Vector3 scale)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x4 | matrix | |
Vector3 | translation | |
Quaternion | rotation | |
Vector3 | scale |
Returns
Type | Description |
---|---|
bool |
Remarks
Note that for a change of handedness, all scales will invert and a corrective rotation will be aded, which will not match the original TSR values, but will be correct in terms of orientation, position and scale.