Garry's Mod Wiki

VMatrix:GetInverse

  VMatrix VMatrix:GetInverse()

Description

Returns an inverted matrix without modifying the original matrix.

Inverting the matrix will fail if its determinant is 0 or close to 0. (ie. its "scale" in any direction is 0.)

See also VMatrix:GetInverseTR.

Returns

1 VMatrix
The inverted matrix if possible, nil otherwise