title: Sprites wont detect collision
body: <p>Sorry for the bad formatting I don't know how to do this. I'm using 2020.3.21f1 and following a tutorial and when the enemy circle hits the player he doesn't take damage. when they collide they don't overlap at all, but the Debug.log isn't registering either so I think that the circle collider 2D is the problem. the enemy sprite still moves towards the player when it is in range. another problem (that will turn into a feature if I cant figure out how to change it) is that when the enemy collides with the player and the player pushes it goes the direction it was pushed until it runs into something <a href="https://youtu.be/VOdYtqV_meo" rel="nofollow noreferrer">Here's the tutorial I'm following</a></p>
  <hr />
  <pre><code>using System.Collections;
  
  using System.Collections.Generic;
  using UnityEngine;
  
  public class Enemy: MonoBehaviour
  {
  public float speed = 3f;
  private Transform target;
  [SerializeField] private float attackDamage = -10f;
  private void Update(){
      if (target != null){
          float step = speed*Time.deltaTime;
          transform.position = Vector2.MoveTowards(transform.position, target.position, step);
      }
  }
  
  private void OnCollision(Collision2D other){
      if (other.gameObject.tag == &quot;player&quot;){
          Debug.Log(&quot;hit&quot;);
          other.gameObject.GetComponent&lt;PlayerHealth&gt;().UpdateHealth(attackDamage);
      }
  }
  
  private void OnTriggerEnter2D(Collider2D other) {
      if(other.gameObject.tag == &quot;Player&quot;){
          target = other.transform;
          Debug.Log(target);
      }
  }
  private void OnTriggerExit2D(Collider2D other) {
      if(other.gameObject.tag == &quot;Player&quot;){
          target = null;
          Debug.Log(target);
      }
  }
  
  }
  </code></pre>