• TF2/QC - Custom/Specific sequence for Viewmodel
    5 replies, posted
Hi, I'm making a weapon for TF2, but instead of rigging it against the hands/weapons bones, I'm rigging it with the lowerArms bones. The problem is that TF2 has an issue with the arm's bones (at least with Scout). For some reason, the arm's bone in the viewmodel are rotated like 90° comparing with the worldmodel, so, when I'm loading the weapon in the game, in the third-person I can see my weapon well aligned to the arms, but in first-person the weapon is rotated out of the arm. So, I made two differents animations, one called "ref" and aligned with the worldmodel, and another called "idle" and aligned to the viewmodel. The problem is that I don't know how can I define thoose sequence so the game use the idle in the first-person and the ref in the third-person. Here is an image about the problem: https://i.imgur.com/zdVozeK.jpg (In the Image I'm using the idle sequence as ref just for testing, but the problem is the same if I use the idle as idle and ref as ref with the difference that the view-model is the issue) Here is my QC for now: $modelname "test/items/scout/c_yao.mdl" $bodygroup "body" { studio "Yao.smd" } $surfaceprop "metal" $contents "solid" $illumposition -0.028 -0.08 1.993 $cdmaterials "test/items/scout" $cbox 0 0 0 0 0 0 $sequence "ref" { "anims\ref.smd" fadein 0.2 fadeout 0.2 fps 30 } $sequence "idle" { "anims\idle.smd" fadein 0.2 fadeout 0.2 fps 30     ACT_IDLE 1 } Note: Sorry if this is the wrong sub-forum, I didn't know if /Developers is just for Gmod or not.
$modelname "player/spy_animation.mdl" $include "spy_definebones.qci" $poseparameter body_pitch -45.00 90.00 360.00 $poseparameter body_yaw -45.00 45.00 360.00 $poseparameter move_y -1.00 1.00 $poseparameter move_x -1.00 1.00 $cdmaterials "models\player\spy/" $sequence layer_animation "animation.smd" fps 30 hidden $sequence animation "animation.smd" noanimation { numframes 100 fadein 2 fadeout 2 blendlayer layer_animation 0 5 95 100 event 5004 25 "Taunt.Sound" event 5004 50 "Taunt.Sound" event 5004 75 "Taunt.Sound" event 5004 100 "Taunt.Sound" } $ikchain rhand bip_hand_R knee  0.743 0.669 0.000 $ikchain lhand bip_hand_L knee  0.733 -0.680 0.000 $ikchain rfoot bip_foot_R knee  0.751 -0.660 -0.000 $ikchain lfoot bip_foot_L knee  0.730 0.000 0.684
Sorry for the late reply. Is this for re-compile the class animations? Is there a way without re-making all the class animations?
Just an example to add to your QC files to import your custom sequence anim. Re-compile shouldn't take too much time. But regardless it would have to be done.
The viewmodel and the world model are shared. All of the viewmodel animations are stored in the hands models rather than the weapon model.
Thanks both for the response. I was afraid that the game uses the same animation of the C Model in both modes, but I just wanted to confirm if there was another way. Well, I will start to re-make the animations for the hands model haha. Anyway, thanks for your help!
Sorry, you need to Log In to post a reply to this thread.