Hello, Im new to coding so bare with me. I want to destroy all enemy game objects that are in the blast radius of a bomb. The simpler the better. Thank you so much for helping!
Instatntiate a sphere gameobject at your bomb position, sphere must have rigidbody and collider and attach the script on this object, disable your mesh component.
Script contain
void OnTriggerEnter(Collider other)
{
if(other.gameObject.tag==“Enemy”)
{
Destroy(other.gameObject);
}
}
In the Start() write some code which scale your gameObject from (0,0,0) to your desired scale(e.g 3,3,3) .
@PaulSullivan87
you can ask further if you have any query.