Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void FixedUpdate()
- {
- currentRotation = Vector3.Lerp(currentRotation, Vector3.zero, returnSpeed * Time.deltaTime);
- Rot = Vector3.Slerp(Rot, currentRotation, rotationSpeed * Time.fixedDeltaTime);
- cameraHolder.localRotation = Quaternion.Euler(Rot);
- }
- public void Fire(WeaponData weapon)
- {
- 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));
- }
Advertisement
Add Comment
Please, Sign In to add comment