Best way to implement AoE damage?

I’m looking into a better concept or workaround for doing my Area of Effect damage system. Basically I have a character that can punch the ground, damaging the surrounding enemies within range.

I’ve only been using SphereTraceByChannel to apply damage. It works pretty well with just one enemy, but when I have around 10 enemies, STBC only returns hits from the enemies in front of me, but doesn’t include the ones behind them. MultiSphereTraceByChannel can return multiple objects but it doesn’t have the Out Hit like the STBC has.

The SphereOverlapActors sounded like a perfect option but that didn’t work for me either.

Any ideas?

1 Like

When I use explosions I use an actor that I created by the name of Hit, the actor is really simple it has a collision sphere and a particle effect. When something overlaps with the sphere the actor sents a call through an Interface for damage and lunch direction if needed. And you can add trace line from the center of the actor to the overlapped characters if you want to check if they hiding behind walls or other objects.

I think MultiSphereTraceByChannel will be useful to you… you absolutely can break out the hit result, it’s just it comes in the form of an array… a full hit result for each actor hit by the trace.

So I found a good workaround for now after it a bit of testing. I used ApplyRadialDamage instead. For anyone who may have the same problem, here’s how I solved it.

My character can now do a AoE damage after jumping, and all enemies in range get launched in the air (see images below).

In my character’s attack animation montage, I set up the anim notify that contains the blueprint below. Within that notify, I set-up an overlap first, to check if any of the enemies are within range of the attack, when they are, it fires off a radial damage, which is the same range as the sphere overlap.

I also used some Draw Debug nodes in between so I have a visual representation of the overlap and radial damage.

In my Enemy_BP, I set it up so if they take radial damage, they get launched in the air. I’ll keep trying to find an even better and more efficient way of doing this.