BindToJoint
Description
The spawnarg bindToJoint with a joint name as value sets the joint to be attached to if an entity is attached to an AI using bind
See a list of common joint names below.
Entities can also be attached using def_attach (see here)
Examples
Create a purse Create an AI and name it Guard_1 In the editor, position and orient the purse as if attached to the AI's belt on the left. Give the purse these spawnargs/values:
bind Guard_1 bindToJoint LeftHips_Dummy
The above would attach the purse to the left hip joint of the AI.
Joints Names
The name of joints can vary with the AI. They are listed in the .md5mesh files for each AI. These are in the darkmod/models/md5/chars folder and can be viewed in a plain text editor.
There is a cvar to enter in the console that shows the skeleton of the AI with joints names in-game. This is the cvar to show joint names is r_showskel 1 to show and 0 to hide.
For most purposes, here is a list of commonly used humanoid joints names for use with bindToJoint and also def_attach:
origin (default I think)
Head
Neck
Spine, Spine1, Spine2 (chest), Spine_Dummy, joint8 (Spine2) joint9 (Spine2), leftpad (Spine2), rightpad (Spine2)
LeftShoulder
RightShoulder
LeftArm, LeftArmRoll,LeftArm_Dummy, LeftForeArm
RightArm, RightForeArm
LeftHand, LeftHandIndex1, LeftHandIndex2, LeftHandIndex3, LeftHandRing1, LeftHandRing2, LeftHandRing3, LeftHandThumb1, LeftHandThumb2, LeftHandThumb3
RightHand, RightHandIndex1, RightHandIndex2, RightHandIndex3, RightHandMiddle1, RightHandMiddle2, RightHandMiddle3, RightHandThumb1, RightHandThumb2, RightHandThumb3
Hips, LeftHips_Dummy (belt), RightHips_Dummy (belt), sword (Hips)
LeftLeg, LeftUpLeg, LeftUpLegRoll, LeftLegRoll, joint3 (LeftUpLegRoll), joint4 (LeftUpLegRoll)
RightLeg, RightUpLeg, RightUpLegRoll, joint5(RightUpLegRoll), joint6(RightUpLegRoll)
LeftFoot, LeftToeBase
RightFoot, RightToeBase