Here’s code. I had marked collider on this object as “IsTrigger”. Also i taged my player and bullet objects with appropriate tags (as in the code) and it still doesn’t work. Triggered object just pass through the bullets and player. All of the objects have both colliders and rigidbody2D. As I tested with Debug.Log it just does not collide. Help please
void OnTriggerEner2D(Collider2D other)
{
if (other.gameObject.tag == "Player" || other.gameObject.tag == "Bullet(Clone)") {
Destroy (this.gameObject);
Destroy (other.gameObject);
}
}