# Detect collision on explosion

I am creating spells for my game.

The collision with a normal fireball works just fine, what I am trying to achieve is to have the player_2 getting hit when the green explosion happens.

How can I achieve that? I tried adding explosion force with very high values just for testing purposes, but I could not make it work.

Below you can check a demonstration of what I am trying to do, and a piece of the code I tried.

this.spellPrefab.GetComponent<Rigidbody>().AddExplosionForce
(configuration.ExplosionForce,
spellPrefab.transform.position,
500,
0f,
ForceMode.Impulse);

• Have you tried using Physics.OverlapSphere to find colliders in range of the explosion? – DMGregory Oct 17 at 0:10
• @DMGregory I will try. But I was trying to avoid doing manual physics, and instead I wanted to just rely on the RigidBodies. But I guess it is just easier if I go for manual stuff, since I am still a newbie with Unity. – Artur Trapp Oct 17 at 10:54
• This in no way prevents you from letting rigidbodies continue to handle your physics. – DMGregory Oct 17 at 11:12
• From what I understand, I can use the collisor as triggers and in the OnTriggerEnter apply the force manually by detecting with the PhysicsOverlaps, right? – Artur Trapp Oct 17 at 12:00
• Did you try it? Did it work? If so, you can post it as an Answer. – DMGregory Oct 17 at 12:01