diff --git a/IronToad_UnityProject/Assets/Scripts/WaterController.cs b/IronToad_UnityProject/Assets/Scripts/WaterController.cs index 48d504f..cd1f2d2 100644 --- a/IronToad_UnityProject/Assets/Scripts/WaterController.cs +++ b/IronToad_UnityProject/Assets/Scripts/WaterController.cs @@ -13,6 +13,8 @@ public class WaterController : MonoBehaviour { public float waveSpeed = 1; public float maxWaveHeight = 2; + private readonly float scaleConstant = 50f; + public GameObject rippleEffect; #region Unity Functions @@ -48,8 +50,15 @@ public class WaterController : MonoBehaviour { pos.y += 1; Quaternion rot = Quaternion.Euler(-90, 0, 0); - if (rippleEffect != null) - Destroy(Instantiate(rippleEffect, pos, rot), 4); + if (rippleEffect != null) { + GameObject ripple = Instantiate(rippleEffect, pos, rot); + + Vector3 scale = Vector3.one * radius / scaleConstant; + ripple.transform.localScale = scale; + + Destroy(ripple, 4); + + } Collider[] colliders = Physics.OverlapSphere(point, radius); foreach (Collider hit in colliders) {