Okay, so I have a grenade script that works fine, but I would like to make it apply force to rigidbodies around it when it explodes. For example, if I throw it at a bunch of crates, I want it to make them fly away when it explodes. How can I do this? Thanks
Here’s the documentation page on it. It would be fairly straight forward to adjust this to your needs. I made a script somewhere for exponential fall off, I think it was on the forums. If I can find it I’ll link to it as well.
Found it. I think the math on this page is correct for an exponential fall off.
The final force = defaultForce * falloff ^ -distFromBlast
Use Physics.OverlapSphere and make a loop that applies force to every rigidbody it hit.