public void Recoil(bool aiming)
        {
            currentRecoilSettings = aiming ? aimRecoil : hipRecoil;
            recoilDistance        = currentRecoilSettings.RecoilStrength * 0.05f;
            elapsedRecoil         = 0.0f;
            if (recoil)
            {
                var currentRecoilPercentage = recoilDistance <= 0.0f
                    ? 0.0f
                    : Mathf.Clamp(currentRecoilDistance / recoilDistance, 0.0f, 1.0f);
                elapsedRecoil = currentRecoilPercentage * currentRecoilSettings.RecoilTime;
            }

            recoil = true;
        }
 public void SetRecoilSettings(GunSettings.RecoilSettings hipRecoilSettings,
                               GunSettings.RecoilSettings aimRecoilSettings)
 {
     hipRecoil = hipRecoilSettings.ThirdPersonRecoil;
     aimRecoil = aimRecoilSettings.ThirdPersonRecoil;
 }