Camera Bone!
- Camera bones are bones that affect player’s view, the in-game camera will copy rotation/transforms from your "camera" bone that you’ve created in your animation software, allowing animators to create good looking handmade camera effects for animations
How to test it?
- Click the link below and subscribe to the addon on Steam Workshop:
https://steamcommunity.com/sharedfiles/filedetails/?id=3267102990
After subscribing, restart Garry’s Mod to ensure the addon is properly loaded.
Select the HL2 Shotgun and test it!
Animation Intensity:Use the console variable cl_camera_anim_intensity to control the intensity of the animation effects.
Default value: 0.5. You can adjust this value in-game to scale the camera movement effects as needed.How to use?Bone Structure:
In weapon qc file we need add $attachment "camera" and "camera_root (better to add, but not necessarily)"
Like this:
$attachment "camera" 0 0 0 rotate 0 0 0
$attachment "camera_root" 0 0 0 rotate 0 0 0 - First Bone: Name this bone camera_root. This bone should not move or be animated at all. It serves as the anchor for your camera system and helps ensure stability.
Note: Adding camera_root is highly recommended for best results, but if it’s not possible to include this bone, the system will still function by using only the camera bone.
- Second Bone: Name this bone camera. This is the bone you will animate. Keyframe and rotate this bone to create the desired camera effects in your animations.
Attachments:
- Add attachments to both bones (camera_root and camera) with names matching the bones.
- Ensure the attachment’s X-axis points in the direction the player is looking. In HLMV, this is represented by the red line when selecting an attachment.
- If camera_root is not present, the camera attachment will still animate as intended.
Animation Preview in Software:
To preview how camera effects will look in-game
Make your animation software’s "Camera" object a child of the camera bone. This setup provides an accurate representation of the in-game effects during animation creation.