ApplyRadialDamage doesn't work

I have a Character and Damage Actor, which has capsule component.
So, as you can see, while the character is inside that Damage Actor damage doesn’t applies. The Log here is the result of ApplyDamage function (which’s return type is bool)

The DamageActor has the following code in Tick function:

DrawDebugSphere(GetWorld(), GetActorLocation(), Radius, 24, SphereColor);
WasDamageApplied = UGameplayStatics::ApplyRadialDamage(GetWorld(), Damage, GetActorLocation(), Radius, nullptr, {}, this, nullptr, DoFullDamage);
UE_LOG(LogDamageActor, Display, TEXT("Apply: %s"), ( WasDamageApplied ? TEXT("true") : TEXT("false") ));

The Character has a HealthComponent (which inherits from ActorComponent class). In BeginPlay function it has following lines:

AActor* ComponentOwner = GetOwner();
if (ComponentOwner)
    {
        ComponentOwner->OnTakeAnyDamage.AddDynamic(this, &USTUHealthComponent::OnTakeAnyDamage);
    }

and the function of HealthComponent OnTakeAnyDamage just decreases health variable and make an ue_log, which doesn’t appears to be in output log. So probably the issue is with applyradialdamage function.
If you need anything else ask, thanks.

This design is pretty familiar :slight_smile: Whats is your target, target dummy or a character ?

So, All I needed to do is to make location of DamageActor by Z a bit higher. The issue was that actor’s center of sphere was in floor mesh (which is brush btw), so this mesh was blocked i guess.

2 Likes

Hmm… This worked for me too… I don’t understand why, though :s

YYYAAAAA , finally its solved by your guild , thanks man … i +100 to z of location and its worked <3