cam.PushModelMatrix
Description
Pushes the specified matrix onto the render matrix stack. Each pushed matrix must be popped via cam.PopModelMatrix.
When used in PANEL:Paint, if you want to rely on the top-left position of the panel, you must use VMatrix:Translate with the (0, 0) position of the panel relative to the screen.
If trying to use it with with cam.Start3D2D, set multiply to true, since cam.Start3D2D pushes its own model matrix.
Arguments
2 boolean multiply = false
If set, multiplies given matrix with currently active matrix (cam.GetModelMatrix) before pushing.
Example
Simple function to draw rotated and/or scaled text.
Output:
Example
Rotating a box while keeping it's matrix positions relative to the panel.
Output: 

Example
Draws a mesh at where the local player is looking at, without regenerating the mesh every frame.
Output: 

Garry's Mod
Rust
Steamworks
Wiki Help