My game has an explosion. I want some system to find all game objects within the radius of the explosion and have each of those objects execute its own “was just affected by an explosion” behavior.
Where should I start? For finding all the objects in the radius of the explosion I’ve been using Physics.OverlapSphere() to get a collection of the colliders affected, but now I don’t know how to execute each of those objects’ own explosion behavior.
I’ve been looking into the Unity Events System, but I don’t know how to Invoke the event for the objects ONLY affected by the explosion.
Is there a good solution to this?