Lua/Client/Character/Functions/GetBones
From JC2-MP Documentation
Returns | table |
---|---|
Prototype | Character:GetBones() |
Description | Returns a table of bone positions and angles. |
Returns | table |
---|---|
Prototype | Character:GetBones(boolean detailedSkeleton) |
Description | Returns an extended table if the boolean is set to true. |
Contents
Example
Render bones from basic skeleton as primitive circles
function RenderBones()
for boneName, bone in pairs(LocalPlayer:GetBones()) do
Render:DrawCircle(bone.position, 0.05, Color.LawnGreen)
end
end
Events:Subscribe("Render", RenderBones)
Result

Render bones from detailed skeleton as primitive circles
function RenderDetailedBones()
for boneName, bone in pairs(LocalPlayer:GetBones(true)) do
Render:DrawCircle(bone.position, 0.05, Color.LawnGreen)
end
end
Events:Subscribe("Render", RenderDetailedBones)
Result

Bones Reference

List of Bone Names
- Main skeleton
- ragdoll_AttachHandLeft
- ragdoll_AttachHandRight
- ragdoll_Head
- ragdoll_Hips
- ragdoll_LeftArm
- ragdoll_LeftFoot
- ragdoll_LeftForeArm
- ragdoll_LeftHand
- ragdoll_LeftLeg
- ragdoll_LeftShoulder
- ragdoll_LeftUpLeg
- ragdoll_Neck
- ragdoll_Reference
- ragdoll_RightArm
- ragdoll_RightFoot
- ragdoll_RightForeArm
- ragdoll_RightHand
- ragdoll_RightLeg
- ragdoll_RightShoulder
- ragdoll_RightUpLeg
- ragdoll_Spine
- ragdoll_Spine1
- Additional bones in detailed skeleton
- ragdoll_Armband1
- ragdoll_Armband2
- ragdoll_EyeLeft
- ragdoll_EyeLeftLid
- ragdoll_EyeRight
- ragdoll_EyeRightLid
- ragdoll_HairCtrl
- ragdoll_Harness
- ragdoll_Jaw
- ragdoll_LeftArmRoll
- ragdoll_LeftCheek
- ragdoll_LeftEyeBrow1
- ragdoll_LeftEyeBrow2
- ragdoll_LeftForeArmRoll
- ragdoll_LeftHandIndex1
- ragdoll_LeftHandIndex2
- ragdoll_LeftHandIndex3
- ragdoll_LeftHandMiddle1
- ragdoll_LeftHandMiddle2
- ragdoll_LeftHandMiddle3
- ragdoll_LeftHandPinky1
- ragdoll_LeftHandPinky2
- ragdoll_LeftHandRing1
- ragdoll_LeftHandRing2
- ragdoll_LeftHandRing3
- ragdoll_LeftHandThumb1
- ragdoll_LeftHandThumb2
- ragdoll_LeftHandThumb3
- ragdoll_LeftLegRoll
- ragdoll_LeftToeBase
- ragdoll_LeftUpLegRoll
- ragdoll_MouthBottom
- ragdoll_MouthCornerLeft
- ragdoll_MouthCornerRight
- ragdoll_MouthTop
- ragdoll_Nostrils
- ragdoll_Pouch
- ragdoll_RightArmRoll
- ragdoll_RightCheek
- ragdoll_RightEyeBrow1
- ragdoll_RightEyeBrow2
- ragdoll_RightForeArmRoll
- ragdoll_RightHandIndex1
- ragdoll_RightHandIndex2
- ragdoll_RightHandIndex3
- ragdoll_RightHandMiddle1
- ragdoll_RightHandMiddle2
- ragdoll_RightHandMiddle3
- ragdoll_RightHandPinky1
- ragdoll_RightHandPinky2
- ragdoll_RightHandRing1
- ragdoll_RightHandRing2
- ragdoll_RightHandRing3
- ragdoll_RightHandThumb1
- ragdoll_RightHandThumb2
- ragdoll_RightHandThumb3
- ragdoll_RightLegRoll
- ragdoll_RightToeBase
- ragdoll_RightUpLegRoll
- ragdoll_xChain1
- ragdoll_xChain2
- ragdoll_xCrusifix