Hello,
I’m having a little trouble understanding why I need to specify the damage amount in the DamageEvent and then a second time when calling TakeDamage. Shouldn’t ‘TakeDamage’ be able to get the damage amount from the DamageEvent?
AActor* HitActor = Hit.GetActor();
if (HitActor != nullptr)
{
FPointDamageEvent DamageEvent(Damage, Hit, ShotDirection, nullptr);
Hit.GetActor()->TakeDamage(Damage, DamageEvent, OwnerController, this);
}