Garry's Mod Wiki



  Entity:EnableMatrix( string matrixType, VMatrix matrix )


Can be used to apply a custom VMatrix to the entity, mostly used for scaling the model by a Vector.

To disable it, use Entity:DisableMatrix.

If your old scales are wrong due to a recent update, use Entity:SetLegacyTransform as a quick fix.

The matrix can also be modified to apply a custom rotation and offset via the VMatrix:SetAngles and VMatrix:SetTranslation functions.
This does not scale procedural bones.

Issue Tracker: 3502
This disables inverse kinematics of an entity.

Issue Tracker: 3502


1 string matrixType
The name of the matrix type.
The only implemented matrix type is "RenderMultiply".
2 VMatrix matrix
The matrix to apply before drawing the entity.


To scale a prop's height by 4x

local scale = Vector(1,1,4) local mat = Matrix() mat:Scale(scale) prop:EnableMatrix("RenderMultiply", mat)

Special Pages



Render Time: 63ms

DB GetPage 23
Generate Html 5
SaveChanges (1) 26
Render Body 0
Render Sidebar 7