From bc605534e6c66cf6867c21bf7628fd6344d28d10 Mon Sep 17 00:00:00 2001 From: in0finite Date: Sat, 27 Jun 2020 22:40:51 +0200 Subject: [PATCH] draw gizmos sphere indicating explosion damage radius --- Assets/Scripts/Behaviours/Vehicles/Vehicle_Damage.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Assets/Scripts/Behaviours/Vehicles/Vehicle_Damage.cs b/Assets/Scripts/Behaviours/Vehicles/Vehicle_Damage.cs index 6e271a30..a5985ed0 100644 --- a/Assets/Scripts/Behaviours/Vehicles/Vehicle_Damage.cs +++ b/Assets/Scripts/Behaviours/Vehicles/Vehicle_Damage.cs @@ -224,6 +224,13 @@ namespace SanAndreasUnity.Behaviours.Vehicles Object.Destroy(meshFilter.gameObject, VehicleManager.Instance.explosionLeftoverPartsLifetime * Random.Range(0.8f, 1.2f)); } + void OnDrawGizmosSelected() + { + // draw sphere indicating explosion damage radius + Gizmos.color = Color.red; + Gizmos.DrawWireSphere(this.transform.position, VehicleManager.Instance.explosionDamageRadius); + } + } }