I’m implementing an character could fire with Grenade Launcher. My weapon fires grenade and it explodes after 1 second.
Problem
I’m suspicious about my ApplyRadialDamage is not applying any damage to target. I have draw a debug line.
Yellow is the impact radius.
Red is the hit points of launcher
Even on a quick glance, target is being hit.
What I did?
Explosion particle effect, yellow debug sphere and ApplyRadialDamage is in the same function. So I’m sure that also that event triggered. Also the ApplyRadialDamage stands between them.
Here is the code :
UGameplayStatics::SpawnEmitterAtLocation(GetWorld(), ExplosionParticle, GetActorLocation(), FRotator::ZeroRotator);
UGameplayStatics::ApplyRadialDamage(GetWorld(), 100.f, GetActorLocation(), 200.f, DamageType, IgnoredActors, this, GetInstigatorController(), true, ECC_MAX);
DrawDebugSphere(GetWorld(), GetActorLocation(), 200.f, 12, FColor::Yellow, false, 10.0f);
Destroy();
On the other side my target is an Actor
and for quick implementation it has Events that if it receives damage.
If I ApplyPointDamage to target dummy, its working. No problem here.
Expected
I would like to see TargetDummy getting damage from the ApplyRadialDamage node.