Animating Weapons for Counter-Strike Source/Editing Attachments
Setting Up
edit- Open the QC file and HLMV.
- In HLMV go to File>Load Model.
- Select the folder weapons and then select the file v_rif_sg552.mdl. (You may select a different model depending what you are animating.)
- Load the model.
- In the render tab on the bottom, uncheck everything except Enable Overbrightening.
Navigating in HLMV
edit- Dragging left click in the circle will affect the pitch and yaw of the model.
- Dragging left click out of the circle will affect the roll of the model.
- Holding onto SHIFT and dragging left click will pan the model around.
- Holding onto CONTROL and dragging left click will pan the light source around.
- Dragging right click either outside or in the circle will zoom the model in and out.
Retrieving the Attachments' Locations
edit- Click the Attachments tab on the bottom of HLMV.
- On the left box, select the attachment 1. This is the muzzle flash.
- On the right box, attach the attachment to ValveBiped.Frame.
- Under the translation box, enter some values and experiment with where you want to place the muzzle flash. Do not use the rotation parameter.
- Once you have found the position, HLMV will tell you what the QC line of code should be. Copy and paste it while replacing the old $attachment line.
- On the left box, select the attachment 2. This is the shell ejection vector. (Where the shells fly out after you fire the gun.)
- On the right box, attach the attachment to ValveBiped.Frame.
- The x axis (red) is the direction in which the shells will fly out.
- Change the translation so the attachment is centered on the shell ejection port.
- Once you have found the position, HLMV will tell you what the QC line of code should be. Copy and paste it while replacing the old $attachment line.
- Save the QC file.