Garry's Mod Wiki


Vector, Angle Entity:GetBonePosition( number boneIndex )


Returns the position and angle of the given attachment, relative to the world.

This function can return entity's GetPos() instead if the entity doesn't have it's bone cache set up.

To ensure the bone position is correct use this:

local pos = ent:GetBonePosition(0) if pos == ent:GetPos() then pos = ent:GetBoneMatrix(0):GetTranslation() end
This can return garbage serverside or Vector(0,0,0) for v49 models.

Issue Tracker: 3285
This can return garbage if a trace passed through the target bone during bone matrix access.

Issue Tracker: 3739


1 number boneIndex
The bone index of the bone to get the position of. See Entity:LookupBone.


1 Vector
The bone's position relative to the world. It can return nothing if the requested bone is out of bounds, or the entity has no model.
2 Angle
The bone's angle relative to the world.

Page Links

Special Pages



Render Time: 67ms

DB GetPage 33
Generate Html 10
SaveChanges (1) 10
Render Body 0
Render Sidebar 12