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?
asked Jul 21 '16 at 02:00 AM in Blueprint Scripting
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.
answered Jul 24 '16 at 05:36 PM
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.
answered Jul 21 '16 at 08:19 PM
TJ V ♦♦ STAFF
Follow this question
Once you sign in you will be able to subscribe for any updates here