From 115821f2daef6ff6da150fc6e6bda444c1b08bf0 Mon Sep 17 00:00:00 2001 From: in0finite Date: Wed, 1 Jul 2020 18:52:35 +0200 Subject: [PATCH] add hit point and hit normal to DamageInfo class --- Assets/Scripts/Behaviours/Weapon.cs | 2 ++ Assets/Scripts/Utilities/Damageable.cs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Assets/Scripts/Behaviours/Weapon.cs b/Assets/Scripts/Behaviours/Weapon.cs index 79bec1a2..6d9ca4e5 100644 --- a/Assets/Scripts/Behaviours/Weapon.cs +++ b/Assets/Scripts/Behaviours/Weapon.cs @@ -640,6 +640,8 @@ namespace SanAndreasUnity.Behaviours { amount = this.Damage, raycastHitTransform = hit.collider.transform, + hitPoint = hit.point, + hitNormal = hit.normal, attacker = m_ped, }); } diff --git a/Assets/Scripts/Utilities/Damageable.cs b/Assets/Scripts/Utilities/Damageable.cs index e91230b4..bef4fe1b 100644 --- a/Assets/Scripts/Utilities/Damageable.cs +++ b/Assets/Scripts/Utilities/Damageable.cs @@ -10,6 +10,8 @@ namespace SanAndreasUnity.Utilities public float amount = 0f; public string damageType = null; public Transform raycastHitTransform = null; + public Vector3 hitPoint = Vector3.zero; + public Vector3 hitNormal = Vector3.up; public object attacker = null; public object data = null; }