So I have an “explosion” object that when created, I want it to figure out which objects are in range, and activate a script function on them, then destroy itself. For now, I’m just printing if a collision is detected, and even that isn’t working.
I have an empty object representing the “explosion” with a script, a collider, and a rigid body. The script has a OnCollisionEnter() call in it, as follows:
function OnCollisionEnter(collision : Collision)
{
print("Collision!");
//print("Collision with: "+collision.gameObject.name);
}
In theory, when this object hits the plane objects I want it to react to, it should print their names. The planes are set up with a mesh, mesh renderer, a collider, a rigid body, and the script I eventually want to talk to.
Am I setting up the objects correctly? Any insight?
I’ve also tried OnCollisionStay to no avail.