# Entity/GetParentWorldTransformMatrix

From Garry's Mod

(Difference between revisions)

(Created page with "{{Func |Description=Returns the position and angle of the entity's move parent as a 3x4 matrix ({{Type|VMatrix}} is 4x4 so the fourth row goes unused). The first three columns...") |
(Next update) |
||

Line 1: | Line 1: | ||

{{Func | {{Func | ||

|Description=Returns the position and angle of the entity's move parent as a 3x4 matrix ({{Type|VMatrix}} is 4x4 so the fourth row goes unused). The first three columns store the angle as a [https://en.wikipedia.org/wiki/Rotation_matrix rotation matrix], and the fourth column stores the position vector. | |Description=Returns the position and angle of the entity's move parent as a 3x4 matrix ({{Type|VMatrix}} is 4x4 so the fourth row goes unused). The first three columns store the angle as a [https://en.wikipedia.org/wiki/Rotation_matrix rotation matrix], and the fourth column stores the position vector. | ||

+ | |||

+ | {{NextUpdate}} | ||

|Realm=Shared | |Realm=Shared | ||

|IsClass=Yes | |IsClass=Yes |

## Revision as of 07:24, 9 May 2019

# Description

Returns the position and angle of the entity's move parent 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.

# Returns

The position and angle matrix.

If the entity has no move parent, an identity matrix will be returned.

If the entity is parented to attachment 0 or the parent isn't a BaseAnimating entity, the equivalent of Entity:GetMoveParent():GetWorldTransformMatrix() will be returned.