Eonirr

Untitled

Mar 31st, 2025 (edited)
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. private void FixedUpdate()
  2. {
  3. currentRotation = Vector3.Lerp(currentRotation, Vector3.zero, returnSpeed * Time.deltaTime);
  4. Rot = Vector3.Slerp(Rot, currentRotation, rotationSpeed * Time.fixedDeltaTime);
  5. cameraHolder.localRotation = Quaternion.Euler(Rot);
  6. }
  7.  
  8. public void Fire(WeaponData weapon)
  9. {
  10. currentRotation += new Vector3(Random.Range (-weapon.RecoilRotation.x, 0), Random.Range(-weapon.RecoilRotation.y, weapon.RecoilRotation.y), Random.Range(-weapon.RecoilRotation.z, weapon.RecoilRotation.z));
  11. }
Advertisement
Add Comment
Please, Sign In to add comment