Apply Radial Damage Hitting Through Walls

I am running into an issue where the ApplyRadialDamage functions is hitting players who are safely behind a wall. In my game specifically we have a rocket launcher, we also have an ability which creates a bubble shield around the players. When this shield is activated and a rocket hits the shield. It blocks the projectile but the radial damage still hits the player. Is there any way to prevent this?

Can you give a picture of your blueprint where you’re calling the ApplyRadialDamage and the collision settings on your bubble shield?

I apply radial damage in the game code. Here it is:

if (IsExplosive)
	{
		if (Damage != 0 && ExplosionRadius > 0 && UDamageType::StaticClass())
		{
			UGameplayStatics::ApplyRadialDamage(this, Damage, NudgedImpactLocation, ExplosionRadius, UDamageType::StaticClass(), TArray<AActor*>(), this, MyController.Get());
		}
	}

As far as the shields collision, here is a screen shot:

Okie Dokie,

What you’re missing is that you didn’t put anything in the DamagePreventionChannel of the ApplyRadialDamage.

It looks like your shield only blocks the Projectile Channel, which looks like it’s a custom channel for you, so what you want should be this:

UGameplayStatics::ApplyRadialDamage(this, Damage, NudgedImpactLocation, ExplosionRadius, UDamageType::StaticClass(), TArray<AActor*>(), this, MyController.Get(), false, ECC_GameTraceChannelX);

Where the X in ECC_GameTraceChannelX is whichever channel your projectile channel is, but you’ll have to look in your DefaultEngine.ini to figure out which it is.

Awesome! I’ll give that a try once I get home thanks for the help.

Yeah so that was the piece I was missing. Instead of messing with my ApplyRadialDamage function I instead had my shield block visibility trace which is the default DamagePreventionChannel.

That’s groovy. Just a note, you probably want to change your function because tracing against the visibility channel is really useful for other things, and this could muck with that. The change to the function is pretty easy, so I’d consider changing it back to projectile and actually passing that into the function instead so the visibility channel will still be there to use for other things.

Can anyone some me this in bp form?

A BP form is here:

But you may need to wait for images links to be fixed first.