Hi, How can i destroy my Destructible mesh in c++ code?
I want to destroy it only when the arrow tag overlaps it.
I writed this:
if (OtherComp->ComponentHasTag("PlayerArrow") && !bIsDestroyed)
{
DestructibleComponent->ApplyDamage(1.f, DestructibleComponent->GetComponentLocation(), DestructibleComponent->GetForwardVector(), 5.0f);
DestructibleComponent->ApplyRadiusDamage(10.f, DestructibleComponent->GetComponentLocation(), 2.f, 100.f, true);
UE_LOG(LogTemp, Warning, TEXT("Destroy"));
bIsDestroyed = true;
}
The log is called but the applyDamage or ApplyRadiusDamage doesn’t break the mesh. What i’m missing?