Get grenade owner character from damage data

arenoo

Member
It seems like the grenade produced damage data is incomplete. The damageData.DamageSource.GetRootOwner() returns the grenade game object itself, not the character that has thrown it. Is referencing the Grenade.Owner the only way to get the owner character?
 
Last edited:
I need to look into it more since but I really think we can remove GetRootOwner since there are other properties in order to get the same data and it's only used in one place. For now using Grenade.Owner is a good approach.
 
Coming back to this question, is there a way to get the character item from a projectile that it spawned? In my case I need to get the reference to the grenade character item from the damage source. From that damage source I can access the projectile but I can't find a way to get the character item itself
 
Where are you getting GetRootOwner? Within ProjectileBase.Destruct when I output the root owner the grenade correctly outputs the character.
 
Back
Top