Entity.SetBonePosition

From GMod Wiki

Jump to: navigation, search
Function
Syntax Entity:SetBonePosition( Integer boneindex, Vector pos, Angle ang )
Description:
Sets the position and angle of a bone.
Returns: nil
In Object: Entity
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Entity.SetBonePosition]Entity.SetBonePosition [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Example

DescriptionMakes an entity spread his bones all over the place. (Only works on entities with bones, like NPC's and players)
Used onNewerClient.png
Code
function StuffUpEveryBone( entity )
    for i = 1, 128 do --An entity cannot have more than 128 bones
        entity:SetBonePosition( i, VectorRand() * 32, VectorRand():Angle() )
    end
end
OutputN/A


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox