Garry's Mod Wiki

Entity:GetWorldTransformMatrix

  VMatrix Entity:GetWorldTransformMatrix()

Description

Returns the position and angle of the entity as a 3x4 matrix (VMatrix is 4x4 so the fourth row goes unused). The first three columns store the angle as a rotation matrix, and the fourth column stores the position vector.

This returns incorrect results for the angular component (columns 1-3) for the local player clientside.

Issue Tracker: 2764
This will use the local player's EyeAngles in rendering hooks.

Issue Tracker: 3106
Columns 1-3 will be all 0 (angular component) in rendering hooks while paused in single-player.

Issue Tracker: 3107

Returns

1 VMatrix
The position and angle matrix.