Talk:Eye Position Setup

From Valve Developer Community
Jump to: navigation, search

Prior to a recent update, the eyes and head movement for sdk models used as the model for the generic_actor entity appeared the same in-game as in HLMV. Several posts at chatbear noted that eye movement was now lacking in sdk models in-game though they appeared correct in HLMV. Genericactor.cpp contains the code:

// remove head turn if no eyes or forward attachment
if (LookupAttachment( "eyes" ) > 0 && LookupAttachment( "forward" ) > 0)
{
	CapabilitiesAdd(  bits_CAP_TURN_HEAD | bits_CAP_ANIMATEDFACE );
}

requiring that an attachment "forward" be defined to enable head and facial movements.

Adding the line:

$attachment "forward" "ValveBiped.Bip01_Head1" 0.0 0.0 0.0 rotate 0 -80 -90

to the QC file to define that attachment with respect to the head orientation (x axis pointing forward) appears to resolve the issue. —BJ(talk) 20:53, 19 Jul 2006 (PDT)

This attachment is actually defined in commonbones.qci in \sourcesdk_content\hl2mp\modelsrc\humans_sdk\Male. The file is pretty useful for making sure none of the "stock" bones/attachments of the HL2 rig get lost during compiles. -- Wunderboy 05:08, 20 Jul 2006 (PDT)
You are correct. It appears to be setup that way in hl2mp but not hl2sp or cs:s. Anyone know if it's needed for cs:s? —BJ(talk) 13:27, 20 Jul 2006 (PDT)

Does anyone know what the eyes and mouth attachments really do? MrFunreal (talk)