{"name":"Arma 3: CfgRecoils","title":"Arma 3: CfgRecoils","type":"topic","url":"https://community.bistudio.com/wiki/Arma_3:_CfgRecoils","revid":373111,"updated":"2025-03-31T10:33:27Z","aliases":["cfgRecoils","recoil"],"markdown":"> [!NOTE]\n> For earlier recoil versions, see ArmA: Armed Assault: CfgRecoils.\n\n### Samples\n\n#### Recoil\n\n- Parameter *muzzleOuter* defines the possible area where the recoil would like to move the weapon's muzzle randomly at each shot. It is defined as ellipse with variables defining the (x = horizontal axis position, y = vertical axis position, a = horizontal magnitude, b = vertical magnitude); or, translated to the weapon's recoil movement behavior (how far to the right, how high up, how much horizontal deviation, how much vertical deviation).\n- Parameter *kickBack* defines the minimum and maximum of random interval for backward force applied over the arms and torso for each fired shot.\n- Remaining parameters define how much of the random muzzle displacement within the defined ellipse space is *permanent* (causing muzzle rise you should compensate for) and how much is *temporary* (causing temporal weapon rise up and down, thus causing the weapon to shake in your hands).\n\nCamera shakes are derived from the overall magnitude of each recoil impulse forces.\n\n```cpp\nclass CfgRecoils\n{\n    class my_awesome_recoil\n    {\n        muzzleOuter[]    = { 0.3, 1.0, 0.3, 0.2 }; // x, y, a, b\n        kickBack[]    = { 0.03, 0.06 };\n        permanent    = 0.1;\n        temporary    = 0.01;\n    };\n};\n```\n\n#### Weapon\n\n```cpp\nclass CfgWeapons\n{\n    class MyRifle\n    {\n        recoil = \"my_awesome_recoil\";\n    };\n};\n```\n\n#### Config\n\n```cpp\nclass CfgWeaponHandling\n{\n    class Recoil\n    {\n        kickVisual    = 0.3;    // multiplier for extra camera-only movement for weapon kickback\n        impulseCoef    = 1;    // common coefficient for weapon-based recoil configuration values, increase to make all recoils stronger, decrease to make them all weaker\n        prone        = 1.25;    // coefficient of recoil forces while in prone (this is further multiplied by weapon resting coefficients)\n    };\n};\n```\n\n**Basic suggestions**\n\n- would you like your weapon to kick more to the right? Increase Horizontal Axis Position value of *muzzleOuter*.\n- would you like your weapon to kick more upwards? Increase Vertical Axis Position value of *muzzleOuter*.\n- would you like your weapon to jump left and right more randomly? Increase Horizontal Magnitude value of *muzzleOuter*.\n- would you like your weapon to jump up and down more randomly? Increase Vertical Magnitude value of *muzzleOuter*.\n- would you like your weapon to climb up more? Increase *permanent*.\n- would you like your weapon to shake more in your hands? Increase *temporary*.\n- would you like your weapon to kick back more? Increase *kickBack*.\n- and vice versa.","sections":[{"heading":null,"level":1,"markdown":"> [!NOTE]\n> For earlier recoil versions, see ArmA: Armed Assault: CfgRecoils."},{"heading":"Samples","level":3,"markdown":""},{"heading":"Recoil","level":4,"markdown":"- Parameter *muzzleOuter* defines the possible area where the recoil would like to move the weapon's muzzle randomly at each shot. It is defined as ellipse with variables defining the (x = horizontal axis position, y = vertical axis position, a = horizontal magnitude, b = vertical magnitude); or, translated to the weapon's recoil movement behavior (how far to the right, how high up, how much horizontal deviation, how much vertical deviation).\n- Parameter *kickBack* defines the minimum and maximum of random interval for backward force applied over the arms and torso for each fired shot.\n- Remaining parameters define how much of the random muzzle displacement within the defined ellipse space is *permanent* (causing muzzle rise you should compensate for) and how much is *temporary* (causing temporal weapon rise up and down, thus causing the weapon to shake in your hands).\n\nCamera shakes are derived from the overall magnitude of each recoil impulse forces.\n\n```cpp\nclass CfgRecoils\n{\n    class my_awesome_recoil\n    {\n        muzzleOuter[]    = { 0.3, 1.0, 0.3, 0.2 }; // x, y, a, b\n        kickBack[]    = { 0.03, 0.06 };\n        permanent    = 0.1;\n        temporary    = 0.01;\n    };\n};\n```"},{"heading":"Weapon","level":4,"markdown":"```cpp\nclass CfgWeapons\n{\n    class MyRifle\n    {\n        recoil = \"my_awesome_recoil\";\n    };\n};\n```"},{"heading":"Config","level":4,"markdown":"```cpp\nclass CfgWeaponHandling\n{\n    class Recoil\n    {\n        kickVisual    = 0.3;    // multiplier for extra camera-only movement for weapon kickback\n        impulseCoef    = 1;    // common coefficient for weapon-based recoil configuration values, increase to make all recoils stronger, decrease to make them all weaker\n        prone        = 1.25;    // coefficient of recoil forces while in prone (this is further multiplied by weapon resting coefficients)\n    };\n};\n```\n\n**Basic suggestions**\n\n- would you like your weapon to kick more to the right? Increase Horizontal Axis Position value of *muzzleOuter*.\n- would you like your weapon to kick more upwards? Increase Vertical Axis Position value of *muzzleOuter*.\n- would you like your weapon to jump left and right more randomly? Increase Horizontal Magnitude value of *muzzleOuter*.\n- would you like your weapon to jump up and down more randomly? Increase Vertical Magnitude value of *muzzleOuter*.\n- would you like your weapon to climb up more? Increase *permanent*.\n- would you like your weapon to shake more in your hands? Increase *temporary*.\n- would you like your weapon to kick back more? Increase *kickBack*.\n- and vice versa."}],"categories":["Arma 3: Weapon & Magazine Configuration"],"groups":["Configuration"]}