Radial Damage with Falloff Has Different Damage Reported Based on Where It Hits a Mesh

I have a grenade launcher in my game, and the grenade it shoots explodes automatically on contact with an enemy. This grenade does radial damage with falloff. I’ve noticed that when I hit an enemy mesh at its base (i.e. the white sphere you see if you click an enemy in the editor), it does full damage, but when I hit the mesh further away from this point it does less damage.

I understand that this function is meant to lessen damage the further away the explosion is from what it’s damaging, but it seems odd that if I hit a mesh directly in one place it would do less damage than hitting it directly in another place. Is this intentional, a bug, or am I just messing something up with collisions/the radial damage function?

void ASLauncherProjectile::Explode()
{
	if (ensure(ExplosionEffect)) {
		UGameplayStatics::SpawnEmitterAtLocation(GetWorld(), ExplosionEffect, GetActorLocation(), GetActorRotation());
	}

	TArray<AActor*> IgnoreActors;
	UGameplayStatics::ApplyRadialDamageWithFalloff(GetWorld(), 50.f, 10.f, GetActorLocation(), 50.f, 500.f, 1.0f, DamageType, IgnoreActors, this, GetInstigatorController());

	Destroy();
}

Hello Domnkou,

Please see the following documentation on UGamePlayStatics::ApplyRadialDamageWithFallOff To understand how each parameter has an effect on Damage fall off. It’s possible that the root component of this character is a different component(Ie Capsule Collision) than the mesh, and may be using a different collision channel.

Thanks,

Nicholas

Hey Nicholas.

The root component is the skeletal mesh itself. And I don’t think it’s an issue with collision channels; the direct hit (and the damage) is always registered, it’s just the amount damage that changes based on how far away the impact is from the base of the mesh.