$attachment
Jump to navigation
Jump to search
$attachment is a QC command available in all
Source games. It defines attachments on a model. Attachments are identified by their name, and can be either relative to the model's origin or parented to a bone.
See also Attachments and Compiling a model.
Syntax
$attachment <string|name> <string|parent bone> <Vector|offset> [absolute] [rigid] [rotate <angle|orientation>]
The optional commands are:
absolute- Parented to the model's origin. The offset is still relative to the given parent bone, however!
rigid- Declares that the bone this attachment is parented to will not move, allowing Studiomdl to delete that bone. The attachment will be re-parented to the next bone in the hierarchy. Useful for precise attachment placement without keeping useless bones.
rotate- Rotates the attachment, in degrees, relative to its parent bone / the origin.
- Todo: There is some weirdness in how the value is interpreted by Studiomdl.
world_align- Flags the attachment to align with the world instead of its own root. Todo: This need more testing.
x_and_z_axes- Similar to
rotatebut only the Y axis stays at its default value. - Todo: Needs testing. Why does this exist? looks useless
Examples
Relative to bone:
$attachment "anim_attachment_RH" "ValveBiped.Anim_Attachment_RH" -0.00 -0.00 0.00 rotate -90.00 -90.00 0.00
Relative to origin (no bone name required):
$attachment "nozzle" "" 0 4.8 0 absolute