I am currently working on a spell/ability system and for this I need to have collisions for various area of effect(AoE) types.
From what I know there are 2 ways to do collision. The first one is to add a trigger component to an actor and use overlap. The second way is to use the OverlapSingle/multip methods of the UWorld class.
AoE can be quite demanding if there are lots of actors and spells being fired and maybe several units have auras that constantly need to check if actors are in range etc.
I was wondering if someone know and could share some insight into which of these methods of collision handling performs best? Perhaps they each perform better in certain scenarios?
A couple of scenarios could be:
Throw grenade(actor) and have it blow up. (instant single use)
Select target area for instant damage (no actor, single use)
Aura - Units within certain range gets some benefits. (Continuous use)
Cone type AoE - Flamethrower or ballistic projectile exploding on impact with followup cone AoE damage.
In case they have same performance characteristics I would consider the Overlap methods superior as they require less setup and if units were to acquire auras from items etc they would have to have collision detection added dynamically.
I am also curious about this for item pickups and other usages. Was considering using sphere collision for the items if it is also possible to change the radius dynamically.
Any thoughts on the subject are welcome:)