I made a collision detecting function for my enemy controller script which is supposed to destroy both the object if it gets by a bullet along with the bullet itself
the line print (“Collision detected!”); will NOT be printed, since the object with the code is destroyed the line before Destroy (this.gameObject); <<<<<<, first of all, you need to see if the collision is triggering, put a Debug.log or print the first line of the OnCollision, verify the objects have a rigid body and a object collider, also verify if you are trying to have Colliders or Colliders2D, sometimes this makes the difference
I’ve finally figured it out,turns out that there is something wrong with the model I’m using causing it not to register the collisions when hit in certain places but when I used a Cube and applied a rigid body to it the collision worked just fine