mirror of
https://github.com/DerTyp7/defrain-shooter-unity.git
synced 2025-10-29 20:52:10 +01:00
Distance to grenade explosion camera shake
if you are close to the grenade you get more camera shake
This commit is contained in:
@@ -66,7 +66,7 @@ public class Grenade : MonoBehaviour
|
||||
if (nearbyObject.GetComponent<Player>() && nearbyObject.GetType() != typeof(UnityEngine.CharacterController)) {
|
||||
// Starts camera shake on player
|
||||
float distance = Vector3.Distance(transform.position, nearbyObject.transform.position);
|
||||
nearbyObject.GetComponent<ProcedualAnimationController>().cameraShake();
|
||||
nearbyObject.GetComponent<ProcedualAnimationController>().cameraShake(distance);
|
||||
}
|
||||
}
|
||||
yield return null;
|
||||
|
||||
Reference in New Issue
Block a user