$attachment: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (added example with clearer syntax)
(cleanup - please check diff to ensure accuracy)
Line 1: Line 1:
Attachment points are now named based instead of fixed indexed based. They also can be defined in absolute coordinates instead of being bone relative. If defined as <code>"rigid"</code>, the bone they're attached won't be assumed to animate and may be optimized out, in which case they'll reattach themselves to the first available parent bone.
<!--
 
Attachment points are now named based instead of fixed indexed based. They also can be defined in absolute coordinates instead of being bone relative. If defined as "rigid", the bone they're attached won't be assumed to animate and may be optimized out, in which case they'll reattach themselves to the first available parent bone. The <code>"rotate"</code> option will change the orientation of the attachment point, in place, relative its parent joint.
The <code>"rotate"</code> option will change the orientation of the attachment point, in place, relative its parent joint.
-->
[[Attachment point]]s are now name-based instead of fixed-index-based.
* Each attachment point's position and orientation can be defined relative to the model's origin <!--or Entity's WorldPosition / placementOrigin ?-->(<code>"absolute"</code>) ''or'' a named [[bone]]. The <code>"rotate"</code> option will change the orientation of the attachment point relative its parent [[joint]].
* If <code>"rigid"</code> is set, StudioMDL assumes the attached-to bone does not animate and may optimize it out, in which case this bone's attachments will reattach themselves to the first available parent bone.


* See [[Attachments]].
* See [[Attachments]].

Revision as of 12:08, 6 May 2008

Attachment points are now name-based instead of fixed-index-based.

  • Each attachment point's position and orientation can be defined relative to the model's origin ("absolute") or a named bone. The "rotate" option will change the orientation of the attachment point relative its parent joint.
  • If "rigid" is set, StudioMDL assumes the attached-to bone does not animate and may optimize it out, in which case this bone's attachments will reattach themselves to the first available parent bone.

Syntax

$attachment (name) (bone name) (X) (Y) (Z) ["absolute"] ["rigid"] ["rotate" pitch yaw roll]

Example

$attachment "anim_attachment_RH" "ValveBiped.Anim_Attachment_RH" -0.00 -0.00 0.00 rotate -90.00 -90.00 0.00