I am currently doing some explosion.
At the beginning I wanted to use just a sphereMultiChannel, where I would loop through all hit actors, register them as unique so I can damage them only once during the explosion, and then apply the damage.
But I also saw the ‘Apply radial damage’, where I could just use the sphereMultiChannel, apply the radial damage to all hit actors and call it a day.
But I am not sure what goes under the hood of apply radial damage, does anyone know if it basically doing what I said in the first place ? and if not, which is the fastest in term of performance ?
Thanks !
If I’m understanding you right, using apply radial damage for your explosion would be better. I can’t speak on whats going on under the hood but it’s there for a reason I would guess.
Hi, in your case “Apply Radial Damage” should be faster, since it does not involve any looping in blueprints. From looking at the C++ code of “Apply Radial Damage” it first calls the function for “Apply Radial Damage with Falloff” (sort of expected but still funny), then it basically gets all overlapping objects inside a sphere with radius of the “Outer Damage Radius”, then loops through them and does a line trace with the “Damage Prevention Channel” to them and if nothing blocks that channel, it will apply damage.
In the end, if you want to make sure what is faster in your case, you can do the logic for a couple of hundreds explosions on tick and watch the “stat game” and see what uses more time.