Garry's Mod Wiki

Entity:CopyBoneMatrix

  Entity:CopyBoneMatrix( number boneID, VMatrix data )

Recently Added

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

Description

Same as Entity:GetBoneMatrix, but instead of returning a new matrix object, it copies the data to a given matrix.

This is measurably faster when accessing bone matrices a lot.

Arguments

1 number boneID
The bone ID to retrieve matrix of, starting at index 0.
2 VMatrix data
The matrix to copy the bone matrix to.