Garry's Mod Wiki

cam.GetViewMatrix

  VMatrix cam.GetViewMatrix()

Recently Added

This was recently added in version (2026.06.03). It might only be available on the Dev Branch right now.

Description

Returns a copy of the view matrix. Also see cam.GetProjectionMatrix.

Will return Identity matrix in 2D Render context. In this case use cam.Start3D. See Render Hook Order.

Returns

1 VMatrix
The currently active view matrix.