fixed animations
This commit is contained in:
@ -42,6 +42,12 @@ public class scr_WeaponController : MonoBehaviour
|
||||
return;
|
||||
}
|
||||
|
||||
CalculateWeaponRotation();
|
||||
SetWeaponAnimation();
|
||||
}
|
||||
|
||||
private void CalculateWeaponRotation()
|
||||
{
|
||||
weaponAnimator.speed = characterController.weaponAnimationSpeed;
|
||||
|
||||
targetWeaponRotation.y += settings.SwayAmount * (settings.SwayXInverted ? -characterController.input_View.x : characterController.input_View.x) * Time.deltaTime;
|
||||
@ -65,4 +71,9 @@ public class scr_WeaponController : MonoBehaviour
|
||||
|
||||
transform.localRotation = Quaternion.Euler(newWeaponRotation);
|
||||
}
|
||||
|
||||
private void SetWeaponAnimation()
|
||||
{
|
||||
weaponAnimator.SetBool("isSprinting", characterController.isSprinting);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user