Handling Recoil
The Recoil component is responsible for applying camera or weapon shake whenever the weapon is fired. It should be attached to the Recoil GameObject under your weapon prefab, and it must be linked in the Weapon script on the root object.
π Integration
To enable recoil in your weapon:
- Make sure your weapon prefab has a child GameObject named 
Recoil. - Attach the 
Recoilscript to that object. - In the 
Weaponscript (on the root), assign theRecoilobject in the relevant field. - Test your weapon and tweak values to get the desired effect.
