Search Unity

Physics2D.GetIgnoreCollision(collider1, collider2) does not work with Joint?

Discussion in 'Physics' started by aegis123321, Dec 30, 2020.

  1. aegis123321

    aegis123321

    Joined:
    Jul 5, 2015
    Posts:
    71
    I want to know if arbitrary two colliders will collide or not. So I called Physics2D.GetIgnoreCollision(collider1, collider2) to check it.
    But it seems not to work.

    Physics2D.GetIgnoreCollision(collider1, collider2) returns False even if they are connected with any joint2D and they do not enable collision.

    I wanna know is there any other way to check if arbitrary colliders(or ridibodies) will collide or not? Because it's hard to check there is any joint connected on this rigidbody.