$attachment: Difference between revisions
Jump to navigation
Jump to search
(cleanup - please check diff to ensure accuracy) |
TomEdwards (talk | contribs) (cleanup) |
||
Line 1: | Line 1: | ||
'''<code>$attachment</code>''' is a QC command that defines a location on a model. Attachments are identified by their name, and can be either relative to the model's origin or [[parent]]ed to a [[bone]]. | |||
See also [[Attachments]]. | |||
== Syntax == | == Syntax == | ||
$attachment | $attachment <[[string]]|name> <string|parent bone> <[[Vector]]|offset> [absolute] [rigid] [rotate <[[angle]]|orientation>] | ||
The optional commands are: | |||
; <code>absolute</code> | |||
: Parented to the model's origin. The offset is still relative to the given parent bone, however! | |||
; <code>rigid</code> | |||
: Declares that the bone this attachment is parented to will not move, allowing Studiomdl to optimise it out. Used to convert bones created in a modelling package into attachments. | |||
; <code>rotate</code> | |||
: 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.}} | |||
== 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 | $attachment "anim_attachment_RH" "ValveBiped.Anim_Attachment_RH" -0.00 -0.00 0.00 rotate -90.00 -90.00 0.00 | ||
[[Category:QC Commands|attachment]] | Relative to origin (no bone name required): | ||
$attachment "nozzle" "" 0 4.8 0 absolute | |||
[[Category:QC Commands|attachment]] |
Revision as of 12:11, 18 October 2009
$attachment
is a QC command that defines a location 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.
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 optimise it out. Used to convert bones created in a modelling package into attachments.
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.
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