I have seen plenty of questions about this but none of them seem to point to an answer for me;
void OnCollisionEnter(Collision collision)
{
if (collision.gameObject.name == "Player")
Destroy(collision.gameObject);
}
is attached to a cube that has a non Kinematic rigidbody, yet when the Player (named Player in the hierachy) makes contact with it, nothing happens. I’ve tried binding the script to several other objects (for example, binding it “backwards” to the cube so when “Bullet” which is a prefab, hits it the Cube disappears)
Thanks in advanced for any help
~Acro
As an extra note; I have tried assigning the prior code to the cube when it hits the ground and the ground did actually disappear. but the things I want to disappear don’t when aimed at them