Hey, so I’m attempting to ignore all collisions between objects with the tag ‘enemy’ and I’m currently using the method below…
private void OnCollisionEnter2D(Collision2D Collision)
{
if (Collision.gameObject.CompareTag("Enemy"))
{
Physics2D.IgnoreCollision((rb2d.GetComponent<CircleCollider2D>()), Collision.gameObject.GetComponent<CircleCollider2D>());
}
}
This only seems to work for any collisions AFTER the initial collision between any two objects. They only IgnoreCollision after they have already collided once initially, afterward they float right through each other. How can I fix it so they never hit each other in the first place?
Thanks for any help