Garry's Mod Wiki

Entity:TranslateBoneToPhysBone

  number Entity:TranslateBoneToPhysBone( number boneID )

Description

Returns the ID of a PhysObj attached to the given bone.

See Entity:TranslatePhysBoneToBone for reverse function.

Arguments

1 number boneID
The ID of a bone to look up the "physics root" bone of.

Returns

1 number
The PhysObj ID of the given bone to be used with Entity:GetPhysicsObjectNum or -1 if we cannot translate for some reason, such as a model bone having no physics object associated with it.