Radial impulse only affects actors when the actor origin is within radius?

I’m creating an explosive weapon, based on this tutorial. I have it almost working, however I’m having trouble finding the appropriate radius. It seems that the radial impulse only affects an actor if that actor’s origin is within the radius of the impulse. This means that for large actors, I have to set a large radius. But if I do, then small actors would be affected even when they’re too far away from the visual effect to be expected to be affected. How can I find a balance between the two?

Hi wmassingham,

The Radial Impulse is a bit limited, it literally only checks for the center of the objects bounds. There is a couple of different ways you could do this:

A less accurate way that still uses the Radial Impulse is to set the Falloff to RIF Linear. Then increase the size of the radius but keep the grenade explosion size the same. With a bit of experimenting you can probably get something close to what you are looking for.

The most accurate method would be to use a Sphere Trace as the grenade detonation > Get all overlapping actors > Then apply an impulse accordingly. It’s a bit more technical to setup but not only would it be much more accurate, you would have more freedom to do other things as well. Things like shoot a grenade near a car or a wall and have it blow bits off of the area contained in the sphere trace but not others.

Let me know if that helps.

Cheers,

TJ

Sphere traces return an array of hit results, not actors. How can I use that to apply impulse?

I also have a sphere collision component that I tried to use to get overlapping actors, but it doesn’t seem to be reporting any, even though I’ve verified that it should be generating overlaps. ActorBeginOverlap events are working. I have a similar (non-projectile) actor for which GetOverlappingActors is working properly.

I’m not sure what the issue was, but it’s resolved now. Using a small sphere collision component for the hit collision and a larger one for the explosion radius overlap is working, as is GetOverlappingActors.

Epilogue: calculating the vector between the two objects goes to the other’s origin, which means the vector can and up being longer than the explosion radius. I gave up on this approach and am just applying a constant impulse force amount.